typescript/tsc
Runs tsc with the strict compiler options over every TypeScript file.
Part of the typescript configuration, at the recommended level. It runs at the push stage, once per scope. It runs tsc.
A type error left in a file can crash the program at run time, though the editor already showed it.
What to do
Section titled “What to do”Fix the first error tsc prints; later errors often come from the same mistake.
Example
Section titled “Example”const count: number = "one"; reports an incompatible assignment. Assign a number, such as const count: number = 1;.
Turn it off
Section titled “Turn it off”Turn it off for some files, with a reason:
gspot ignore typescript/tsc --paths "<glob>" --reason "<why>"To silence one place, write a comment such as:
// @ts-expect-error: the library types omit this overload