top type

A type that every other type fits into, so it can hold any value; in TypeScript both unknown and any play this role.

In more detail

unknown is the safe top type: it accepts everything but lets you do nothing without checking. any is an unsafe escape hatch that behaves as both top and bottom.

Related terms

Taught in

References