From 973f5d5c13ed1602109d80d6dc05d26ff15c727d Mon Sep 17 00:00:00 2001 From: Amr Draz Date: Wed, 3 Oct 2018 17:25:17 +0200 Subject: [PATCH] Not much can be done So generally speaking other than using the slightly shorter array on the Bits and BinaryBits types Not much can be done regarding the unsigned int types. Your salvation may come with this proposal should the day come https://github.com/Microsoft/TypeScript/issues/15480 But Typescript will probably not support base uintx types as this discussion ended https://github.com/Microsoft/TypeScript/issues/4639 essentially JS is expecting BigInt and other types may be added someday and so no extra primitives will be added until T39 adds them on a side note this regex proposal should it get implemented would be interesting https://github.com/Microsoft/TypeScript/issues/6579 --- source/types.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/types.ts b/source/types.ts index ae6688c..d56ac5b 100644 --- a/source/types.ts +++ b/source/types.ts @@ -1,6 +1,6 @@ export type Bit = 0 | 1 -export type Bits = Array -export type BooleanBits = Array +export type Bits = Bit[] +export type BooleanBits = boolean[] export type Byte = [Bit, Bit, Bit, Bit, Bit, Bit, Bit, Bit] export type Nibble = [Bit, Bit, Bit, Bit]