Skip to content

javascript/tsc

Type-checks plain JavaScript through its JSDoc comments.

Part of the javascript configuration, at the recommended level. It runs at the push stage, once per scope. It runs tsc.

A wrong call in JavaScript crashes at run time, and written types let the checker catch it first.

Add or fix the JSDoc type that the error names.

Passing a number to a JSDoc string parameter reports a type error. Pass a string, or fix the JSDoc.

Turn it off for some files, with a reason:

gspot ignore javascript/tsc --paths "<glob>" --reason "<why>"

To silence one place, write a comment such as:

// @ts-expect-error: the library types omit this overload