Skip to content

Instantly share code, notes, and snippets.

@hades2510
Created November 3, 2022 08:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hades2510/733ad8c26ea4a9831401f4b8401ad11e to your computer and use it in GitHub Desktop.
Save hades2510/733ad8c26ea4a9831401f4b8401ad11e to your computer and use it in GitHub Desktop.
type PartialByteNot<T extends Bit[]> = T extends [
infer U extends Bit,
...infer R extends Bit[]
]
? [BitNot<U>, ...PartialByteNot<R>]
: [];
type ByteNot<T extends Byte> = T extends [
infer U extends Bit,
...infer R extends Bit[]
]
? [BitNot<U>, ...PartialByteNot<R>]
: [];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment