Systemjs转换器抱怨但是typescript编译器运行正常

时间:2016-01-22 14:31:03

标签: typescript systemjs

所以我现在一直在为我的项目使用tsc,但是11秒的编译真的很长,我想看看有多快可以发现和整个体验。

经过一些修修补补后,我设法让转换工作得到了解决,但我得到了一些我能看到的错误,但我不知道如何修复它们。

Uncaught SyntaxError: Unexpected identifier

代表行:

services_1.customSetTimeout(function () self.watchForMessage(self), self.displayTimeoutInterval);

self.timeout = setTimeout(function () self.getTrack(self), delta * 1000);

return System.import(path).then(function (c) c[name]);

static isUserInjector() {
  return function (next, prev) core_1.Injector.resolveAndCreate([AuthService, core_1.provide(services_1.HttpAdvanced, { useClass: services_1.HttpAdvanced })]).get(AuthService).isUser();
}

Uncaught SyntaxError: Unexpected token this

换行:

setTimeout(function () this.getItems(this), dt * 60 * 1000);

现在我可以看到问题是setTimeout不在任何库中而是本机js函数,我没有在任何地方明确提到Systemjs作为库。

如何轻松添加这些2以便没有人抱怨?我知道添加一个库不应该是一个问题,但setTimeout有点烦我,因为我尝试声明它并没有帮助

是否可以让systemjs提供有关语法错误的更多信息?

0 个答案:

没有答案