Skip to content

tsc: TS5053: Option 'noEmit' cannot be specified with option 'composite' #36917

Description

TypeScript Version: 3.9.0-dev.20200220 (broken in 3.8.2)

Search Terms: TS5053: Option 'noEmit' cannot be specified with option 'composite'

Code

{
  "compilerOptions": {
    "composite": true
  }
}

Expected behavior:

Run a type-check with no errors, as in 3.7 and previous versions.

Actual behavior:

# npx tsc --noEmit
tsconfig.json:3:5 - error TS5053: Option 'noEmit' cannot be specified with option 'composite'.

3     "composite": true,
      ~~~~~~~~~~~

Found 1 error.

Additional comments:

We use composite in our tsconfig.json to ensure the output directory structure is always the same.
We also use --noEmit in our CI pipelines to ensure type-checking before building a Docker image.

Is the --noEmit the best way to do type-checking without the overhead of running an entire build (with output files) or this breaking change should really be reverted?

Related Issues:
#36588 - attempt to remove the composite from tsconfig.json and use as CLI flag when building project

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions