-
Notifications
You must be signed in to change notification settings - Fork 1
Description
I intend to use this issue as a sticky note to hold all ideas of type I had but which I, or someone else will introduce in a later date.
(as I currently write this, the bottleneck of the project isn't the lack of types, but the the lack of testing existing type)
-
Static List Length constraint
StaticListLengthConstaint<T, 5>// T must be of length 5
useful for specific tuple types -
List No Duplicate
ListNoDuplicate<[1, false, true, 1]>// fails because one is being duplicated.
useful to imitate a set, but at compile time -
List No Missing Type
ListNoMissingType<['key_a', 'key_c'], 'key_a' | 'key_b' | 'key_c'>// fails because ['key_a', 'key_c'] misses 'key_b'
useful combined to ListNoDuplicate to make a reorder array while ensuring that all element of the array order have been kept