{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreidhabzgjt6fmztlmid6pub2lbixl5rspl2fe2vxrtmrd2fxtbh6gq",
    "uri": "at://did:plc:25rdn5elo5izoxrmtis34zuk/app.bsky.feed.post/3mozghi5ri2p2"
  },
  "coverImage": {
    "$type": "blob",
    "ref": {
      "$link": "bafkreihhngyhexduhsbbiyyvyum3toxm32zxghgwvxli2imoryiyyfwru4"
    },
    "mimeType": "image/webp",
    "size": 153760
  },
  "path": "/shawon/dev-hack-how-to-stop-typescript-ts-files-from-ruining-your-macos-smart-folders-3f4h",
  "publishedAt": "2026-06-24T07:36:33.000Z",
  "site": "https://dev.to",
  "tags": [
    "productivity",
    "tutorial",
    "typescript",
    "webdev"
  ],
  "textContent": "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.\n\nYou 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.\n\nHere’s why this happens and how to permanently banish TypeScript files from your media filters without breaking Finder’s search scope.\n\n##  The Problem: macOS Thinks You’re an MPEG-2 Enthusiast\n\nBy default, macOS recognizes the `.ts` file extension as an **MPEG-2 Transport Stream** —a video container format used for broadcast streaming and DVDs.\n\nFinder 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.\"\n\nIf 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.\n\n##  The Fix: Using Advanced \"Raw Query\" Rows\n\nTo 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:\n\n###  1. Set Up Your Base Media Filters\n\nOpen Finder, press `Cmd + Option + N` to create a new Smart Folder, and set up your initial include parameters using the standard `+` button. For example:\n\n  * **Kind** is `Movie`\n  * **Last opened date** is within the last `365` days\n\n\n\n###  2. Reveal the Hidden Boolean Menu\n\nDo 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.\n\nClick the **`...`** button on your bottom row. This spawns a nested sub-rule block.\n\n###  3. Target the `.ts` Extension Exclusively\n\nConfigure your new nested rule block to strictly target and exclude the file extension:\n\n  1. Change the main dropdown of this nested block from _Any_ or _All_ to **None**.\n  2. Click the first dropdown in the sub-row underneath it and select **Other...**\n  3. Search for **\"File extension\"** , check the box next to it to enable it, and click **OK**.\n  4. Set the row to: **File extension** | **is** | **`ts`**\n\n\n\nYour smart folder rules should now look exactly like this:\n\n_(Note: Replace with your screenshot if publishing!)_\n\n\n\n    [Kind] is [Movie]\n    [Last opened date] is within last [365] [days]\n    └── [None] of the following are true:\n        └── [File extension] is [ts]\n\n\n\n###  4. Save and Forget\n\nClick the **Save** button in the upper right corner, name your folder (e.g., _\"Recent Movies\"_), and keep **\"Add to Sidebar\"** checked.\n\nFinder 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.",
  "title": "Dev Hack: How to Stop TypeScript (.ts) Files From Ruining Your macOS Smart Folders"
}