Comment Comment by chromakode Alternatively for the case of id strings with known prefixes, a unique feature of TypeScript is you can use template string literal types:https://www.kravchyk.com/adding-type-safety-to-object-ids-ty... parent chromakode 2 years ago
https://www.kravchyk.com/adding-type-safety-to-object-ids-ty...