Skip to content

tsBuildInfoFile compiler option should be allowed without incremental or composite in Typescript versions >5.6 #59958

Closed
@romanstetsyk

Description

@romanstetsyk

🔎 Search Terms

"tsBuildInfoFile", "tsBuildInfoFile without incremental", "tsBuildInfoFile without incremental or composite", "TS5111"

🕗 Version & Regression Information

  • I was unable to test this on prior versions because it wasn't considered a bug in prior versions.

⏯ Playground Link

https://github.com/romanstetsyk/tsbuildinfo-error

💻 Code

// tsconfig.json
{
  "compilerOptions": {
    "tsBuildInfoFile": "./.cache/tsconfig.tsbuildinfo"
  }
}

🙁 Actual behavior

Error: Option 'tsBuildInfoFile' cannot be specified without specifying option 'incremental' or 'composite' or if not running 'tsc -b'.

image

🙂 Expected behavior

No error if incremental or composite is not specified with tsBuildInfoFile.

According to the Typescript 5.6 announcement:

TypeScript now always emits a .tsbuildinfo file for any project in a --build invocation (even if --incremental/--composite is not specified)

Additional information about the issue

The issue goes away if tsconfig.json is renamed to anything else, e.g. tsconfig.app.json.

The build process with tsc --build ./tsconfig.json is successful even though VSCode shows an error in tsconfig.json.

The issue can't be reproduced in the TypeScript Playground because tsBuildInfoFile can't be configured there.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions