Last active
March 26, 2022 22:21
-
-
Save dagda1/a88f8af394f054c2182cfebd6494836e to your computer and use it in GitHub Desktop.
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 Equal<X, Y> = (<T>() => T extends X ? 1 : 2) extends (<T>() => T extends Y ? 1 : 2) ? true : false | |
type Test1 = Equal<[1, 2, '3'], [1, 2, '3']> | |
// ^? - type Test1 = true | |
type Test2 = Equal<[1, 2, '3'], [1, 2, 3]> | |
// ^? - type Test2 = false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment