Skip to content

Incomplete description of tsBuildInfoFile config default behavior #2393

Closed as not planned
@henry-filosa

Description

@henry-filosa

It seems to me that the default description of https://www.typescriptlang.org/tsconfig#tsBuildInfoFile is incomplete. It simply says that the default outfile is .tsbuildinfo, but this PR lays out much more complex behavior:

  • When tsconfig specifies compiler options incremental file with .tsbuildinfo extension is emitted.
  • Composite projects indirectly specify incremental as true and its error to specify incremental as false in the composite project
  • If project specifies tsBuildInfoFile options, it uses the path specified by that to write the build information.
  • If project specifies out or outFile option, the outFileWithoutExtension.tsbuildinfo file is written next to output js file.
  • If project specified outDir, config files base file name with extension as .tsbuildinfo is written in outDir
  • Otherswise config files base file name with extension as .tsbuildinfo is written next to the config file

Highlights added by me. This means that my incremental build file is tsconfig.tsbuildinfo as we follow the common convention of tsconfig.json. While this behavior is not a huge deal, I think it's preferable to have it documented. As it stands I had to delve into a years old PR to figure out why the documented behavior didn't match my observed behavior.

Metadata

Metadata

Assignees

No one assigned

    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