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
I understand to get the string name of an Enum I can do:
MyModule.MyEnum[MyModule.MyEnum.Foo]
However it would be neat/more concise to support something like C#'s nameof operator:
nameof(MyModule.MyEnum.Foo)
Which would output the longer version for runtime. The only benefits of this really are less typing and less verbose (annoying with long namespaces). And if TS supported nameof on parameters, it would be a bonus.
The text was updated successfully, but these errors were encountered:
Looks like that is a full proposal of nameof. I suppose this would be a smaller implementation scoped to enums only, which seems a lot easier to get out the door than a full nameof proposal. I also didn't find that issue since it was Closed. Also, there was no mention of Enum types in that issue.
I understand to get the string name of an Enum I can do:
However it would be neat/more concise to support something like C#'s
nameof
operator:Which would output the longer version for runtime. The only benefits of this really are less typing and less verbose (annoying with long namespaces). And if TS supported
nameof
on parameters, it would be a bonus.The text was updated successfully, but these errors were encountered: