We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
TypeScript Version: 2.7.0-dev.201xxxxx
Code
interface Model { '0': number } const key = '0'; const keyLiteral: '0' = '0'; const myModel = { '0': 9 } const { [key]: iendupAsAny } = myModel; const { [keyLiteral]: iEndupAnyAsWell } = myModel; const { ['0']: meImWellTyped } = myModel;
Expected behavior: I would expect the 3 fields to be typed as number or a typescript error since noImplicitAny is true
Actual behavior:
the first 2 end up as any
The text was updated successfully, but these errors were encountered:
This looks related to, but not quite the same as #16789
Sorry, something went wrong.
Fixed by #21070
The examples in the OP should be fixed in latest.
No branches or pull requests
TypeScript Version: 2.7.0-dev.201xxxxx
Code
Expected behavior:
I would expect the 3 fields to be typed as number or a typescript error since noImplicitAny is true
Actual behavior:
the first 2 end up as any
The text was updated successfully, but these errors were encountered: