Type guard: detect whether a type is a literal type.
Type Parameters
T
Type to test
Remarks
Distinguishes string, number, and boolean literals from their
corresponding primitive base types. The any type always resolves
to false to avoid false positives.
Type guard: detect whether a type is a literal type.