main
Last change
on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
517 bytes
|
Line | |
---|
1 | /**
|
---|
2 | * Check whether `A1` is equal to `A2` or not.
|
---|
3 | * @param A1
|
---|
4 | * @param A2
|
---|
5 | * @returns [[Boolean]]
|
---|
6 | * @example
|
---|
7 | * ```ts
|
---|
8 | * import {A} from 'ts-toolbelt'
|
---|
9 | *
|
---|
10 | * type test0 = A.Equals<42 | 0, 42 | 0> // true
|
---|
11 | * type test1 = A.Equals<{a: string}, {b: string}> // false
|
---|
12 | * type test3 = A.Equals<{a: string}, {readonly a: string}> // false
|
---|
13 | * ```
|
---|
14 | */
|
---|
15 | export declare type Equals<A1 extends any, A2 extends any> = (<A>() => A extends A2 ? 1 : 0) extends (<A>() => A extends A1 ? 1 : 0) ? 1 : 0;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.