惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

量子位
D
DataBreaches.Net
Microsoft Security Blog
Microsoft Security Blog
V
Visual Studio Blog
GbyAI
GbyAI
美团技术团队
云风的 BLOG
云风的 BLOG
大猫的无限游戏
大猫的无限游戏
小众软件
小众软件
博客园 - 叶小钗
Engineering at Meta
Engineering at Meta
博客园 - 三生石上(FineUI控件)
N
Netflix TechBlog - Medium
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
G
Google Developers Blog
博客园 - 【当耐特】
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
宝玉的分享
宝玉的分享
阮一峰的网络日志
阮一峰的网络日志
T
The Blog of Author Tim Ferriss
Y
Y Combinator Blog
U
Unit 42
P
Proofpoint News Feed
V
V2EX

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Dev Hack: How to Stop TypeScript (.ts) Files From Ruining...
Shawon Saha · 2026-06-24 · via DEV Community
Cover image for Dev Hack: How to Stop TypeScript (.ts) Files From Ruining Your macOS Smart Folders

Shawon Saha

If you are a web developer who also happens to keep a movie collection or video assets on your Mac, you’ve probably run into a deeply frustrating macOS quirk.

You decide to set up a Finder Smart Folder to track your recent video files or movies. You set the criteria to Kind is Movie, look at the results, and instead of a clean list of MP4s and MKVs, your folder is absolutely flooded with thousands of .ts files from your local development projects.

Here’s why this happens and how to permanently banish TypeScript files from your media filters without breaking Finder’s search scope.


The Problem: macOS Thinks You’re an MPEG-2 Enthusiast

By default, macOS recognizes the .ts file extension as an MPEG-2 Transport Stream—a video container format used for broadcast streaming and DVDs.

Finder has absolutely no idea that you are a modern JavaScript developer building applications. It just sees thousands of .ts source files in your node_modules or project directories and proudly flags them as "Movies."

If you try to fix this by typing -extension:ts directly into the Finder search bar, it often resets the search scope, causing your Smart Folder to completely break and return zero results.


The Fix: Using Advanced "Raw Query" Rows

To filter out TypeScript code without breaking your global search scope, you need to use Finder's hidden advanced boolean logic. Here is how to set it up step-by-step:

1. Set Up Your Base Media Filters

Open Finder, press Cmd + Option + N to create a new Smart Folder, and set up your initial include parameters using the standard + button. For example:

  • Kind is Movie
  • Last opened date is within the last 365 days

2. Reveal the Hidden Boolean Menu

Do not touch the search bar. Instead, hold down the Option (⌥) key on your keyboard. You will notice that the + buttons on the right side of your rules instantly transform into ... (Ellipsis) icons.

Click the ... button on your bottom row. This spawns a nested sub-rule block.

3. Target the .ts Extension Exclusively

Configure your new nested rule block to strictly target and exclude the file extension:

  1. Change the main dropdown of this nested block from Any or All to None.
  2. Click the first dropdown in the sub-row underneath it and select Other...
  3. Search for "File extension", check the box next to it to enable it, and click OK.
  4. Set the row to: File extension | is | ts

Your smart folder rules should now look exactly like this:

(Note: Replace with your screenshot if publishing!)

[Kind] is [Movie]
[Last opened date] is within last [365] [days]
└── [None] of the following are true:
    └── [File extension] is [ts]

4. Save and Forget

Click the Save button in the upper right corner, name your folder (e.g., "Recent Movies"), and keep "Add to Sidebar" checked.

Finder will now perfectly index your entire drive for actual video files while completely ignoring your development workspace. No more digging through a sea of TypeScript components just to find a video file.