Do you realize that TypeScript fixes this much more elegantly by fronting all references to this with let _this = this;. I'm also much more pro-figuring-out-how-the-language-works rather than going down dependency he'll trying to patch it.
Cofounded Host Collective (DiscountASP.net). Cofounded Player Axis (Social Gaming). Computer Scientist and Technology Evangelist with 20+ years of experience with JavaScript!
Do you realize that TypeScript fixes
this
much more elegantly by fronting all references to this withlet _this = this;
. I'm also much more pro-figuring-out-how-the-language-works rather than going down dependency he'll trying to patch it.TypeScript fixes some problems with
this
. Arrow functions fix some problems withthis
. These solutions do not fix ALL problems withthis
.Consider this code that cannot be solved with TypeScript or arrow functions:
You fix it with an explicitly typed
this
.