"esbuild and swc strip types fast. They don't type-check. That's a feature."
What they do
esbuild (Go) and swc (Rust) are extremely fast TypeScript-to-JavaScript transpilers. They take your .ts files and produce .js files in milliseconds. What they don't do: type checking. They strip the types and emit; that's the whole job.
This is intentional. Type checking is slow because it's a graph problem (every type references other types). Transpilation is parallel-friendly per-file. By splitting the jobs — transpiler for emit, tsc --noEmit for type checks — you get both fast builds and full type safety.
Where they appear
You almost never use esbuild or swc directly. They're embedded:
- Vite uses esbuild for dev-time transpilation.
- Next.js uses swc.
- Bun uses its own transpiler (forked from JavaScriptCore).
- tsx (the Node TS wrapper) uses esbuild.
- Vitest uses esbuild.
If you've used any modern TypeScript build tool, you've used esbuild or swc indirectly.
When to use directly
For bundling: esbuild src/main.ts --bundle --outfile=dist/bundle.js. For a small lib that doesn't need a full build pipeline. For experiment/prototype code. For server-side bundling.
tsc is the modern TypeScript build pipeline. Vite, Next, Bun all follow this model. The split is why TypeScript no longer feels slow.