RunTypes

Type Checking

What each way of declaring a type costs the TypeScript compiler.

Each time the compiler expands a generic type, TypeScript counts one instantiation. The count is a good measure of how much work a type gives the checker. You pay it on every build and every keystroke in your editor, whatever you validate at runtime.

The charts compare ways of declaring the same type. RunTypes appears twice, once as a plain TypeScript type and once through its type builders, beside typia, which also reads a plain type, and the schema builders of TypeBox and zod.

Lower is better. Zero is a real result and the best one: the compiler resolved the declaration without expanding any generic.

Each chart is the geometric mean of every case in its group. A form that cannot declare a case gets the highest count of the forms that can.

AJV has no bar on purpose. It validates a JSON Schema document and gets no TypeScript type from it, so the compiler has nothing to expand.
$ loading benchmark…
Copyright © 2026