Type Checking
// 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
{
"scripts": {
"type-check": "tsc --noEmit"
}
}// Related terms
TypeScript Migration
The process of converting a JavaScript codebase to TypeScript — renaming files from `.js` to `.ts`, adding type annotations, and configuring `tsconfig.json`. Done incrementally (one file at a time with `allowJs: true`) or all at once (big-bang). In QA contexts, migration targets test files, page objects, and support files, adding compile-time safety to previously untyped assertions and command signatures.
tsconfig
The configuration file (`tsconfig.json`) that tells the TypeScript compiler how to type-check and build a project — which files to include, how strict to be, and what module/target settings to use. For a test suite it's where you turn on `strict`, wire path aliases so specs import helpers cleanly, and pull in framework type definitions (Cypress, Playwright, Jest) so editor autocomplete and type errors work inside tests.
Implicit Any
A value TypeScript falls back to typing as `any` because it can't infer a type and none was given — silently switching off type-checking for that value. The `noImplicitAny` compiler flag (part of `strict`) turns these into errors instead. In test code, an implicit `any` on an API response or a page-object return means typos and wrong-shaped assertions compile fine and only blow up at runtime.