Closed ghandic closed 3 weeks ago
When generating enums, it would be good to centralise the options for use in select menus etc
When enums are produced at the moment it creates:
export type Payment = 'Debit' | 'Credit';
Preferentially it could be
export enum Payment { Debit = 'Debit', Credit = 'Credit' }
Now you can access array of options:
Object.values(Payment)
Alternatively define the array of enumerated values and then define the type from that, then it will avoid the typescript enum issues
When generating enums, it would be good to centralise the options for use in select menus etc
When enums are produced at the moment it creates:
Preferentially it could be
Now you can access array of options: