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 was experimenting with using a global enum to differentiate messages from a message broker like the BroadcastChannel browser API. I was hoping to get compile-errors when a string enum gets expanded by a key with an already present value. It makes sense, that there is no error at compile-time, but the result should at least be consistent between the JavaScript and .d.ts results.
π Search Terms
"enum"
π Version & Regression Information
β― Playground Link
https://www.typescriptlang.org/play?#code/FAUwdgrgtgBAsiAzoghgcyTA3sGeYASAogDIkDyMAvDAEQBGAniLcAL6iSwLLqY74YAIQCaRanSYt2wAMYB7MIgAuMWRJ6oMiAHSiiAbmBA
π» Code
π Actual behavior
declarations
π Expected behavior
declarations
Additional information about the issue
I was experimenting with using a global enum to differentiate messages from a message broker like the BroadcastChannel browser API. I was hoping to get compile-errors when a string enum gets expanded by a key with an already present value. It makes sense, that there is no error at compile-time, but the result should at least be consistent between the JavaScript and .d.ts results.
The idea relates to #53013
The text was updated successfully, but these errors were encountered: