-
Notifications
You must be signed in to change notification settings - Fork 12.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ReadonlySet
and ReadonlyMap
are lacking Symbol.toStringTag
#60042
Comments
Is there any reason not to simply have the |
These are well known symbols of es2015. https://262.ecma-international.org/6.0/#sec-well-known-symbols |
These interfaces do not describe actual ECMAScript constructors. Adding |
@rbuckton I don't have a strong opinion on this one; I just found it and fixed it. That said, here's a reason we might want to add
For example, interface EventCounts extends ReadonlyMap<string, number> {} and at runtime,
It seems ReadonlyMap does describe Map and the expectation that it is readonly. |
Related: whatwg/webidl#357 |
π Search Terms
ReadonlySet
,ReadonlyMap
,Symbol.toStringTag
π Version & Regression Information
This is the behavior in every version I tried, and I reviewed the FAQ for entries about
ReadonlySet
,ReadonlyMap
,Symbol.toStringTag
β― Playground Link
https://www.typescriptlang.org/play/?target=99#code/C4TwDgpgBAsgrsAhsAlgOwOY0WGFgAWA9gCYByiAttALxQCiAHgMYA2cJEAPANYQhEAZrBxc4aHmiIB3NABoo4yTLQA+BXwHCAShEQkiaViGxgxEqbIVLLa1QChQkWAmToMAZXx5CpCtSg6JjYObk0hKC9gc2VZdShwnT0DIxAomNtVB3sAehyoAAFgAGcAWghGSGZgcoAnWqJa+1Z8KEQALhckVExTH2JyKlpIkEoAIyJWADpgIg9gWvcAFUQMXPyisoqqmoh6xubWsc74bvco-r8hwJHxyZm5heXV+yA
π» Code
π Actual behavior
Both
@ts-expect-error
s giveUnused '@ts-expect-error' directive.(2578)
π Expected behavior
Both
@ts-expect-error
s are usedAdditional information about the issue
No response
The text was updated successfully, but these errors were encountered: