Description
π Search Terms
log which program is being checked
β Viability Checklist
- This wouldn't be a breaking change in existing TypeScript/JavaScript code
- This wouldn't change the runtime behavior of existing JavaScript code
- This could be implemented without emitting different JS based on the types of the expressions
- This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
- This isn't a request to add a new utility type: https://github.com/microsoft/TypeScript/wiki/No-New-Utility-Types
- This feature would agree with the rest of our Design Goals: https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals
β Suggestion
Log the project that is being checked. Also log something if all checks pass. E.g.:
$ tsc --build
Checking tsconfig.json
Checking packages/a/tsconfig.build.json
Checking packages/a/tsconfig.json
Checking packages/b/tsconfig.build.json
Checking packages/b/tsconfig.json
Success β
π Motivating Example
The tsc
command now has useful logging in case of success by default.
π» Use Cases
Currently tsc
doesnβt log anything about the project itβs checking. In case of success, it logs nothing. If a command run takes longer and emits nothing, I usually get suspicious something went wrong.
A more serious use case are project references. TypeScript checks referenced projects one by one. A program may fail type checking. If it does, TypeScript will log which files failed type checking. However, it is ambiguous of which program this file was a part. It may be part of multiple programs. It may succeed type checking for one program, but fail in another. I.e. maybe one program should have excluded it. Or maybe it should have added a missing lib
, but which program?
All of this can be debugged using --traceResolution
, but that info is very verbose and it takes a clean and second run