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
constfruits={PINEAPPLE: 'tasty'};// Name of the property is mistyped and running this code in JS engines// will result in a TypeError.fruits.PINAPPLE.toUpperCase();
Expected behavior:
Following error should be raised if checkJs and noImplicitAny flags are enabled: Property 'PINAPPLE' does not exist on type '{ PINEAPPLE: string; }'. Did you mean 'PINEAPPLE'?
Actual behavior:
No error is shown.
Related Issues:#16137 - this one describes a similar problem, but for some reason it was closed by reporter.
The text was updated successfully, but these errors were encountered:
Probably a bug in the code that allows JS objects created by object literals to be assigned new properties -- but a property access should still be an error.
Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed.
TypeScript Version: 2.8.0-dev.20180302
Search Terms:
Code
Expected behavior:
Following error should be raised if
checkJs
andnoImplicitAny
flags are enabled:Property 'PINAPPLE' does not exist on type '{ PINEAPPLE: string; }'. Did you mean 'PINEAPPLE'?
Actual behavior:
No error is shown.
Related Issues: #16137 - this one describes a similar problem, but for some reason it was closed by reporter.
The text was updated successfully, but these errors were encountered: