UNPKG

517 BTypeScriptView Raw
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 */
15export declare type Equals<A1 extends any, A2 extends any> = (<A>() => A extends A2 ? 1 : 0) extends (<A>() => A extends A1 ? 1 : 0) ? 1 : 0;
16
\No newline at end of file