Created
November 3, 2022 08:18
-
-
Save hades2510/295b42799de4112f41b162c479a79a40 to your computer and use it in GitHub Desktop.
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
type ShiftLeft<T extends Byte> = T extends [ | |
infer U extends Bit, | |
...infer R extends Bit[] | |
] | |
? [...R, Zero] | |
: never; | |
type ShiftRight<T extends Byte> = T extends [ | |
...infer U extends Bit[], | |
infer R extends Bit | |
] | |
? [Zero, ...U] | |
: never; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment