Last active
November 4, 2021 02:13
-
-
Save EchoZhaoH/e2697bb89bb764df9652a3e8493c1be9 to your computer and use it in GitHub Desktop.
typescript array ArrayReverse
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 ArrayReverse<T extends any[]> = T extends [infer A, ...infer B] ? [...ArrayReverse<B>, A] : T |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment