In Javascript, generate bidirectional mappings for enums, between Name: Value and between Value: Name. (#4960)

This commit is contained in:
Taj Morton
2018-10-04 10:37:22 -07:00
committed by Wouter van Oortmerssen
parent 925c1d77fc
commit d840856093
4 changed files with 30 additions and 17 deletions

View File

@@ -4,13 +4,13 @@
* @enum
*/
var Character = {
NONE: 0,
MuLan: 1,
Rapunzel: 2,
Belle: 3,
BookFan: 4,
Other: 5,
Unused: 6
NONE: 0, 0: 'NONE',
MuLan: 1, 1: 'MuLan',
Rapunzel: 2, 2: 'Rapunzel',
Belle: 3, 3: 'Belle',
BookFan: 4, 4: 'BookFan',
Other: 5, 5: 'Other',
Unused: 6, 6: 'Unused'
};
/**