Loading...
type Env = 'DEV' | 'PROD';
type EnvKey = 'dev' | 'prod';type Env = 'DEV' | 'PROD';
type EnvKey = Lowercase<Env>;Lowercase derives the lowercase union, so the two lists cannot drift apart.
toLowerCase(), the type alone does not change the string.string stays string.No, it is a type-level transform only. Use toLowerCase() on the value.
Yes, it maps over each member, so Lowercase<'A' | 'B'> is 'a' | 'b'.