Assert that a type resolves to a string.
string
Type that must be a string
Produces a compiler error if the provided type is not a string.
type A = AssertString< '42' >; // ✓type B = AssertString< 42 >; // ✗ TS error Copy
type A = AssertString< '42' >; // ✓type B = AssertString< 42 >; // ✗ TS error
Assert that a type resolves to a
string.