union.tsconst altEnum = ['Foo', 'Bar', 'Baz'] as const; type AltEnum = typeof altEnum[number] // 'Foo' | 'Bar' | 'Baz'