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
constCONFIG={foo: '',setFoo: function(foo: string){// accessing (reading or writing) CONFIG.foo is not allowed!CONFIG.foo=foo;// <-- Error: Variable 'CONFIG' is used before being assigned.}};
Expected behavior:
I don't see why this is not a valid statement.
Actual behavior:
Trying to access any defined member of CONFIG in a method, defined within the object itself, raises an error: Variable 'CONFIG' is used before being assigned.
The text was updated successfully, but these errors were encountered:
TypeScript Version: nightly (2.0.2)
In strictNullChecks mode only:
Code
Expected behavior:
I don't see why this is not a valid statement.
Actual behavior:
Trying to access any defined member of
CONFIG
in a method, defined within the object itself, raises an error: Variable 'CONFIG' is used before being assigned.The text was updated successfully, but these errors were encountered: