Last active
May 8, 2025 17:17
-
-
Save raganwald/5abdf935ee0b963e81cf2931902c41db to your computer and use it in GitHub Desktop.
TypeScript Handy Dandies
This file contains hidden or 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
type Expect<T extends true> = T; | |
type Equal<X, Y> = (<T>() => T extends X ? 1 : 2) extends <T>() => T extends Y ? 1 : 2 | |
? true | |
: false; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment