Search code examples
typescripttsconfigcompiler-options

Why are the TypeScript compilerOptions 'noEmitOnError: true' and 'isolatedModules: false' not compatible?


When I run TypeScript with isolatedModules true and isolatedModules false, I get this error:

tsconfig.json(5,9): error TS5053: Option 'noEmitOnError' cannot be specified with option 'isolatedModules'.

Why??

Example tsconfig:

{
    "compilerOptions": {
        "noEmitOnError": true,
        "isolatedModules": true,
    }
}

Solution

  • Apparently the restriction was a mistake. Fixed on master!: https://github.com/Microsoft/TypeScript/pull/31043