TypeScript Compiler Options
noEmitHelpers — TypeScript compiler option
Suppresses inline helper definitions when transformations would otherwise generate them. References to required helpers can remain in emitted code. Supply the correct helpers through a deliberate runtime setup, or prefer importHelpers with a compatible tslib in modules. This setting alone does not make transformed code self-contained. Default: false. Create the named files in a clean local project. Run tsc -p tsconfig.json. Expected output files: dist/example.js. Tested using TypeScript 5.8.3 and Node.js 22.16.0; local project instructions, not a single-file editor. The primary fixture inspects output only; running it without the helper is expected to fail.
Formal Syntax & Structure
typescript syntaxtypescript
{ "compilerOptions": { "noEmitHelpers": true }}Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| noEmitHelpers | boolean | Set in compilerOptions; default: false. |
Working Example
Example Snippettypescript
// File: tsconfig.json (omit this label){ "compilerOptions": { "target": "ES5", "module": "CommonJS", "strict": true, "types": [], "noEmitOnError": true, "outDir": "dist", "noEmitHelpers": true }, "files": [ "example.ts" ]}// File: example.tsexport const result = { ...{ count: 3 }, extra: 4 };console.log(result.count + result.extra);