Skip to content

Description of tsBuildInfoFile is misleading in generated tsconfig.jsonΒ #48053

Closed
@uhyo

Description

@uhyo

Bug Report

πŸ”Ž Search Terms

tsconfig tsBuildInfoFile Specify the folder

πŸ•— Version & Regression Information

4.5.5, 4.7.0-dev.20220227

⏯ Playground Link

N/A

πŸ’» Code

After running tsc --init the generated tsconfig.json includes the following line:

  // "tsBuildInfoFile": "./",                          /* Specify the folder for .tsbuildinfo incremental compilation files. */

πŸ™ Actual behavior

The description says "Specify the folder" and the sample value also indicates that you specify a folder for this option.

However, specifying a folder would result in a following error when running tsc:

error TS5033: Could not write file '/path/to/folder': EISDIR: illegal operation on a directory, open '/path/to/folder'.

πŸ™‚ Expected behavior

Actually you need to specify the file .

The official tsConfig doc also says β€œThis setting lets you specify a file”.

A fix would be, for example:

  // "tsBuildInfoFile": "./.tsbuildinfo",                          /* Specify the path to .tsbuildinfo incremental compilation file. */

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptGood First IssueWell scoped, documented and has the green lightHelp WantedYou can do this

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions