Skip to main content

Or<A, B>

Or<A, B> = [A, B][number] extends false ? false : true extends [IsEqual<A, true>, IsEqual<B, true>][number] ? true : never

Defined in: packages/react-querybuilder/src/types/type-fest/or.ts:23

Returns a boolean for whether either of two given types are true.

Use-case: Constructing complex conditional types where multiple conditions must be satisfied.

Type Parameters

Type Parameter
A extends boolean
B extends boolean

Example

import type {Or} from 'type-fest';

Or<true, false>;
//=> true

Or<false, false>;
//=> false

See

And


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.