Print names of generated files part of the compilation to the terminal.
This flag is useful in two cases:
- You want to transpile TypeScript as a part of a build chain in the terminal where the filenames are processed in the next command.
- You are not sure that TypeScript has included a file you expected, as a part of debugging the file inclusion settings.
For example:
example
├── index.ts
├── package.json
└── tsconfig.jsonexample
├── index.ts
├── package.json
└── tsconfig.jsonWith:
json
{
"compilerOptions": {
"declaration": true,
"listFiles": true
}
}{
"compilerOptions": {
"declaration": true,
"listFiles": true
}
}Would echo paths like:
$ npm run tsc
path/to/example/index.js
path/to/example/index.d.ts$ npm run tsc
path/to/example/index.js
path/to/example/index.d.tsNormally, TypeScript would return silently on success.