Chrome Typescript debugging references wrong '

2019-01-12 09:57发布

问题:

Sometimes when I hit a breakpoint in the Chrome Developer Tools, the TypeScript this is actually _this in the JavaScript. I have to manually put _this in the console to see what is actually being used. Is there a way to fix this?

回答1:

the TypeScript this is actually _this in the JavaScript

This is due to a bug in the sourcemaps. You can track it here : https://github.com/Microsoft/TypeScript/issues/2859