Skip to main content

And<A, B>

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

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

Returns a boolean for whether two given types are both 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 {And} from 'type-fest';

And<true, true>;
//=> true

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

See

Or


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.