main
Last change
on this file since d24f17c was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
559 bytes
|
Line | |
---|
1 | import { 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 | */
|
---|
16 | export 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];
|
---|
Note:
See
TracBrowser
for help on using the repository browser.