Add string initializers to an enum
Change Typescript enum so that it has string initializers.
Start file
const enum TestkitType { vanilla, unidriver, protractor, puppeteer, unknown, }
End file
const enum TestkitType { vanilla = 'VANILLA', unidriver = 'UNIDRIVER', protractor = 'PROTRACTOR', puppeteer = 'PUPPETEER', unknown = 'UNKNOWN', }
View Diff
2,6c2,6 < vanilla, < unidriver, < protractor, < puppeteer, < unknown, --- > vanilla = 'VANILLA', > unidriver = 'UNIDRIVER', > protractor = 'PROTRACTOR', > puppeteer = 'PUPPETEER', > unknown = 'UNKNOWN',
Solutions by @GIA917229015:
Unlock 2 remaining solutions by signing in and submitting your own entry