QamoosTech
Testing & QualityTools and qualityIntermediatePythonTypeScript

Type Checker

PronunciationTYPE CHEK-er

Definition

A type checker reads your code and its type hints and reports type mistakes, such as passing a string where a number is expected, without running the program.

Where you hear it

In CI checks, Python projects that use mypy or pyright, and TypeScript builds.

Examples

  • CI runs the type checker and fails on any error.
  • The type checker caught that None can reach this line.
  • The type checker reports that the price may be undefined in the cart total.

Common mistake

Thinking it enforces types at runtime. In Python the hints are not checked when the program runs.

Don't confuse with

A linter, which looks for style problems and likely bugs. A type checker specifically verifies types.

Say it at work

  • In a meeting or chatFix the type checker errors before merging.
  • In an email or ticketRun mypy in strict mode on the new module.