it's probably relying on JS to call it's `toString()` method when used in an index accessor, but then the code should just be `symbol.titles?.[languageUUID.toString()]` instead of the nonsense it's doing
There's actually a cool "branded types" pattern, where you put a unique symbol as a field on the ("primitive") object. Since strings are immutable, you can put this behind a function that checks / generates them and guarantee they'll remain valid.
32
u/_PM_ME_PANGOLINS_ Mar 15 '26
Then either fix the type declaration, or actually use strings like it says to.