3 ms·
I'm interested as to whether they did deep code analysis or just added the (not strictly correct, but not terrible) assumption that `this` refers to an instance
by brlewis 9y ago
I'm interested as to whether they did deep code analysis or just added the (not strictly correct, but not terrible) assumption that `this` refers to an instance of the class you're defining. Unfortunately this article is light on links to original source material.
- mattbierner 9y agoNo we don’t do that. In TypeScript code ‘this’ is typed, and we can infer the type of this for classes and ES5 classes in JS. However we don’t analyze calls to ‘.call’ or ‘.apply’ to infer the type of ‘this’ in a given function.