Type guard: detect unknown (excluding any).
unknown
any
Type to test
Differentiates unknown from any and from concrete types by combining constraint checks with an explicit any exclusion.
type A = IsUnknown< unknown >; // truetype B = IsUnknown< any >; // falsetype C = IsUnknown< string >; // false Copy
type A = IsUnknown< unknown >; // truetype B = IsUnknown< any >; // falsetype C = IsUnknown< string >; // false
Type guard: detect
unknown(excludingany).