4 ms·
Yes, and generating those unions from a const array gives you even further flexibility with runtime access: `const myStrArray = ["a", "b", "c"] as const; type M
by _jumble 5y ago
Yes, and generating those unions from a const array gives you even further flexibility with runtime access: `const myStrArray = ["a", "b", "c"] as const; type MyStrType = typeof myStrArray[number];`