-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
New definition of PropertyKey does not observe the keyofStringsOnly
setting
#24945
Comments
PropertyKey type alias has nothing to do with For instance, |
Ok, but |
it is not a catch all flag. it is meant for a specific use case. |
So |
I am not sure i follow. |
I see. I'm not sure why this is suddenly breaking my code in 2.9 then, but oh well 🤷♂️. Thanks for the info. |
Let me add to this issue and point out something I just discovered today. The definition of Example: Perhaps TypeScript should introduce a second, more strict definition like this: So that the return type of |
As luck would have it, I almost filed a TS issue today (ES2015 explicitly says that |
TypeScript Version: 2.9.2
Search Terms:
PropertyKey
keyofStringsOnly
Code
In
lib.es5.d.ts
, we have nowhowever this seems incorrect if
"keyofStringsOnly": true
. So as to observe that setting, it seems like it should beThe text was updated successfully, but these errors were encountered: