Open sam-goodwin opened 5 years ago
It should be possible to create types that resemble enums.
E.g.
const type = enum('a', 'b'): // is of Type<'a' | 'b'>
Probably do with function overloading
function enum<A1 extends string>(a: A1): Enum<A1> function enum<A1 extends string, A2 extends string>(a: A1, a2: A2): Enum<A1 | A2> // etc.
It should be possible to create types that resemble enums.
E.g.
Probably do with function overloading