Runtime Type Check

Noun · Development

Definitions

  1. A type verification performed during program execution rather than at compile time, using mechanisms like Java's instanceof, Python's isinstance(), or libraries like Zod and io-ts that validate untrusted data against a schema at runtime. Essential at system boundaries where compile-time guarantees do not apply.

    In plain English: Checking that data is the right type while the program is running, since some guarantees disappear after code is compiled.

    Example: "TypeScript types vanish at runtime, so we use Zod for runtime type checks on API request bodies before touching the database."

Related Terms