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
It would be similar to what we can do right now in C# enums. Personally, want this feature because I want my declared enums in TypeScript (API client) to be exactly like those in C# code (API server), but I think it would be useful for others too. Besides, current error In 'const' enum declarations member initializer must be constant expression. is a little funny because cons enum values are constant expressions in mu opinion ;)
The text was updated successfully, but these errors were encountered:
Right now we can write code like this in C#:
and in Typescript we can simulate that with this code:
and everything work fine (just EnumB.Foo isn't inlined, but it is not a big problem).
It would be nice if we could do something like this with const enums:
It would be similar to what we can do right now in C# enums. Personally, want this feature because I want my declared enums in TypeScript (API client) to be exactly like those in C# code (API server), but I think it would be useful for others too. Besides, current error
In 'const' enum declarations member initializer must be constant expression.
is a little funny because cons enum values are constant expressions in mu opinion ;)The text was updated successfully, but these errors were encountered: