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?
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
来源:https://stackoverflow.com/questions/31346989/chrome-typescript-debugging-references-wrong-this