tsc emits with the whole program and its checker; esbuild, swc and Babel see one file's syntax. isolatedModules makes tsc reject code they cannot compile at all, but output still differs where it depends on types or settings. Checked on esbuild 0.28.2, @swc/core 1.16.20 and Babel 8.0.9 against tsc 6.0.3 and 7.0.2:
- Const enums.
tscwithoutisolatedModulesinlines every use and emits no object. The tools emit a real enum object and inline only same-file uses (Babel only withoptimizeConstEnums); an importing file reads the member at runtime. esbuild also inlines across files when bundling. Adeclare const enumhas no object anywhere, hence TS2748 underisolatedModules. - Namespaces. All three compile them, but swc and Babel treat each block of a merged namespace as its own scope, so an unqualified reference to another block's export throws a
ReferenceError. Babel documents this;isolatedModulesdoes not catch it. - Class fields.
tscderivesuseDefineForClassFieldsfromtarget(on from ES2022). esbuild copies that rule from tsconfig'starget; swc defined fields even withtarget: es2020; Babel 8 always keeps type-only fields. - Decorator metadata.
emitDecoratorMetadataserialises types. esbuild does not support it; swc guesses from syntax (typeof T === "undefined" ? Object : T); Babel's TypeScript preset has no option for it.
isolatedDeclarations (TS 5.5) applies the same idea to .d.ts files. Every export needs a type a reader of that one file can write down: explicit return types and property annotations, with trivial inferences such as literals or as assertions allowed. It requires declaration or composite. In return, any tool can emit declarations per file without a checker (ts.transpileDeclaration, swc's jsc.experimental.emitIsolatedDts), and a monorepo can emit every project's declarations in parallel instead of waiting on dependencies.