IfNever<T, TypeIfNever, TypeIfNotNever>
IfNever<
T
,TypeIfNever
,TypeIfNotNever
> =IsNever
<T
> extendstrue
?TypeIfNever
:TypeIfNotNever
Defined in: packages/react-querybuilder/src/types/type-fest/if-never.ts:21
An if-else-like type that resolves depending on whether the given type is never
.
Type Parameters
Type Parameter | Default type |
---|---|
T | - |
TypeIfNever | true |
TypeIfNotNever | false |
See
Example
import type {IfNever} from 'type-fest';
type ShouldBeTrue = IfNever<never>;
//=> true
type ShouldBeBar = IfNever<'not never', 'foo', 'bar'>;
//=> 'bar'
caution
API documentation is generated from the latest commit on the main
branch. It may be somewhat inconsistent with official releases of React Query Builder.