You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add syntactic sugar to string enum declarations to infer their values from their key names. The overwhelming majority of string enum values are identical or near-identical to their key names, and it's kludgy to list every reserved value twice in its declaration.
enum<string> Foo {
A,
B,
...,
Y = 'LegacyOverrideYValue',
Z,
LongAndSimilarEnumName,
LongUnsimilarEnumName,
}
// instead of
enum Foo {
A = 'A',
B = 'B',
...,
Y = 'LegacyOverrideYValue',
Z = 'Z',
LongAndSimilarEnumName = 'LongAndSimilarEnumName',
LongUnsimilarEnumName = 'LongUnSimilarEnumName',
}
// which contains a sneaky bug
Activity
AnyhowStep commentedon Jan 20, 2020
#16464