Checks if a given type T is not the any type. The logical negation of IsAny.
T
any
IsAny
The type to check.
true if T is not any, false otherwise.
true
false
type T1 = IsNotAny<any>; // falsetype T2 = IsNotAny<unknown>; // truetype T3 = IsNotAny<string>; // true Copy
type T1 = IsNotAny<any>; // falsetype T2 = IsNotAny<unknown>; // truetype T3 = IsNotAny<string>; // true
Checks if a given type
Tis not theanytype. The logical negation ofIsAny.