Type Checking

Automation

// Definition

Static analysis that verifies type correctness at compile time rather than runtime. TypeScript's type checker compares the types of values passed to functions, assigned to variables, and returned from expressions against their declared types. In test suites, type checking catches property typos on fixture objects, wrong argument order on custom commands, and assertions against `undefined` values — before the tests ever run.

// Code Example

package.json — type-check script
JSON
{
  "scripts": {
    "type-check": "tsc --noEmit"
  }
}

// Related terms