run time

The moment when a program is actually executing, as opposed to when it is written, compiled or built.

In more detail

For TypeScript, run time is when the emitted JavaScript executes in Node.js, Bun or a browser. Types exist only at compile time, so they add no run time cost but also cannot guard run time data. Checks on untrusted input must therefore be real JavaScript code that runs.

Example

typeof x === "string" is a run time check; x: string is a compile time annotation

Related terms

Taught in

References