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
constmouseUpListener=(upEvent: MouseEvent)=>{// (do something)window.removeEventListener('mouseup',mouseUpListener);// *1};
I get an error on line *1 saying: "Variable 'mouseUpListener' is used before being defined". I can change const to let and it works, but I'm not sure I see the difference (the function body won't ever run until the variable is set, so is const).
Is this expected / correct?
The text was updated successfully, but these errors were encountered:
TypeScript Version: 2.0.2
With this code:
I get an error on line *1 saying: "Variable 'mouseUpListener' is used before being defined". I can change
const
tolet
and it works, but I'm not sure I see the difference (the function body won't ever run until the variable is set, so isconst
).Is this expected / correct?
The text was updated successfully, but these errors were encountered: