I have an enum (I code using TypeScript):
export enum AddressType { NotSet = 0, Home = 1, Work = 2, Headquarters = 3, Custom = -1, }
I often run into this when using number id's. My way around this quirk is to add ''+ to convert it to string type:
''+