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