typeof
on a well-known symbol in a computed property name has a poor error
#42523
Labels
Domain: Error Messages
The issue relates to error messaging
Effort: Moderate
Requires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual".
Experience Enhancement
Noncontroversial enhancements
Fixed
A PR has been merged for this issue
Milestone
Found talking to @benlesh
If you try to write the following
You'll get an error like
This is pretty confusing, because we do support well-known symbols that are declared with
symbol
instead of unique symbol if you use the following syntax:It would be great if we could detect this case and specialize the error message with something like
The text was updated successfully, but these errors were encountered: