This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export type Expect<T extends true> = T; | |
export type Equal<X, Y> = (<T>() => T extends X ? 1 : 2) extends < | |
T | |
>() => T extends Y ? 1 : 2 | |
? true | |
: false; | |
type NotGate<T extends number> = T extends 1 ? 0 : 1; | |
type AndGate<T extends number, K extends number> = [T, K] extends [1, 1] | |
? 1 |