PhantomJs에서 사용하는 typescript (I C# 프로그래머)로 큰 JS 프로젝트를 변환했습니다. 이 js 파일을 실행하는 동안 인터프리터 (phantomjs)가 실패하는 문제가 있습니다.typescript 컴파일 된 파일을 시작하지 못했습니다.
D:\My\phantomjs-1.9.7-windows\phantomjs.exe --load-images=false --ssl-protocol=any --web-security=no --cookies-file=cookies C:\Users\alex\Projects\robot\bo.js
TypeError: 'undefined' is not an object (evaluating 'b.prototype')
코드는 다음과 같습니다
var __extends = this.__extends || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]
function __() { this.constructor = d; }
__.prototype = b.prototype; // <<< here
d.prototype = new __();
};
겠어요 - 문제는 상속과 다소 관련이 있다고 생각합니다. 이 문제가 발생 했습니까? 어떤 도움을 주셔서 감사합니다. 감사.
(당신이
.js
확장을 사용하여로드 순서를 확인하는 확인하는 것은) HTTP를 수행 : // WWW. typescriptlang.org/Playground가 코드를 컴파일합니까? 아니면 코드의 평화? typescript에 대한 소스 맵을 생성하고 Chrome의 devtools에서 typescript의 버그가있는 부분을 검사하는 것도 가능합니다. –