typelab / assertions / IsString
type IsString<T> = _IsTrue<IfString<T, true, false>>;Checks if a given type T is a string.
| Type Parameter | Description |
|---|---|
|
|
The type to be checked. |
true if T is a string, false otherwise.
type Valid = IsString<string>; // true
type Invalid = IsString<number>; // false