Type guard: detect whether a type is not a literal type.
Type to test
Logical negation of IsLiteral. The any type always resolves to false to avoid false positives.
any
false
type A = IsNonLiteral< string >; // truetype B = IsNonLiteral< 'a' >; // false Copy
type A = IsNonLiteral< string >; // truetype B = IsNonLiteral< 'a' >; // false
Type guard: detect whether a type is not a literal type.