UNPKG

559 BTypeScriptView Raw
1import { Boolean } from './_Internal';
2/**
3 * Logical `||` operator (behaves like the JS one)
4 * @param B1 Left-hand side
5 * @param B2 Right-hand side
6 * @returns [[Boolean]]
7 * @example
8 * ```ts
9 * import {B} from 'ts-toolbelt'
10 *
11 * type test0 = B.Or<B.True, B.False> // True
12 * type test1 = B.Or<B.True, B.True> // True
13 * type test2 = B.Or<B.Boolean, B.False> // Boolean
14 * ```
15 */
16export declare type Or<B1 extends Boolean, B2 extends Boolean> = {
17 0: {
18 0: 0;
19 1: 1;
20 };
21 1: {
22 0: 1;
23 1: 1;
24 };
25}[B1][B2];