Type Alias: IfAny<T, TypeIfAny, TypeIfNotAny>
ts
type IfAny<T, TypeIfAny, TypeIfNotAny> =
IsAny<T> extends true ? TypeIfAny : TypeIfNotAny;An if-else-like type that resolves depending on whether the given type is any.
Type Parameters
| Type Parameter | Default type |
|---|---|
T | - |
TypeIfAny | true |
TypeIfNotAny | false |
See
Author
sindresorhus https://github.com/sindresorhus/type-fest