Skip to content

Commit

Permalink
Document default tsBuildInfoFile defaults
Browse files Browse the repository at this point in the history
I was going to report a bug because the actual default of tsbuildinfo
does not match the docs for --tsBuildInfoFile. I found [this issue] was
already reported and closed as 'working as intended'.

So I decided to add @sheetalkamat's response to the docs.

[this issue]: microsoft/TypeScript#30925
  • Loading branch information
Caleb ツ Everett committed Mar 1, 2023
1 parent e49b912 commit f6f13ce
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion packages/tsconfig-reference/copy/en/options/tsBuildInfoFile.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,17 @@ This setting lets you specify a file for storing incremental compilation informa
building of larger TypeScript codebases. You can read more about composite projects [in the handbook](/docs/handbook/project-references.html).

This option offers a way to configure the place where TypeScript keeps track of the files it stores on the disk to
indicate a project's build state — by default, they are in the same folder as your emitted JavaScript.
indicate a project's build state.

The default depends on a combination of other settings

- If `outFile` the file is `<outFile>.tsbuildinfo`

- If `rootDir` and `outDir` then the file is `<outDir>/<relative path to config from rootDir>/<config name>.tsbuildinfo`
For example if `rootDir` is `src` and `outDir` is `dest` and the config is
`./tsconfig.json` then tsBuildInfoFile defaults to `./tsconfig.tsbuildinfo`
because the relative path from `src/` to `./tsconfig.json` is `../`.

- If just `outDir` then `<outDir>/<config name>.tsbuildInfo`

- otherwise `<config name>/.tsbuildInfo`

0 comments on commit f6f13ce

Please sign in to comment.