typelab / assertions / IsClass
type IsClass<T> = _IsTrue<IfClass<T, true, false>>;Checks if a given type T is a Class type.
| Type Parameter | Description |
|---|---|
|
|
The type to be checked. |
true if T is a Class type, false otherwise.
class DummyClass {}
type Valid = IsClass<typeof DummyClass>; // true
type Invalid = IsClass<string>; // false