Not sure if this is a bug in JDL, or if I'm just not understanding it, but if I create an enum in Jhipster JDL like this
enum PricingModel {
AVAILABILITY,
DEADLINES,
PAYMENTS
}
Then it will generate this typescript for my angular code.
export const enum PricingModel {
'AVAILABILITY',
'DEADLINES',
'PAYMENTS'
}
Unless I am doing the switch statement wrong... this switch statement will not work:
To fix it I propose that the generated code from JhipsterJDL be changed to generate something like this ad defined in Typescript 2.4 :
export const enum PricingModel {
AVAILABILITY = 'AVAILABILITY',
DEADLINES = 'DEADLINES',
PAYMENTS ='PAYMENTS',
}