Typescripts,命令行生成的JS文件不正确,变量在文件末尾定义

时间:2015-03-23 05:46:30

标签: javascript typescript

我有一个关于HTML5项目的Typescripts,当我使用vs2013 IDE编译项目时,JS文件将正确生成,但是当我使用命令行编译项目时,JS文件变量将最终定义该文件,有谁知道,为什么会发生?

批处理脚本:

SET buildDir=C:\Program Files\Microsoft Visual Studio 12.0\Common7\IDE "%buildDir%\DEVENV" "%projectDir%\xxx.sln" /rebuild "Release|Any CPU" /useenv

JS档案:

var Greeter = (function () {
function Greeter(element) {
    this.element = element;
    this.element.innerHTML += "The time is: ";
    this.span = document.createElement('span');
    this.element.appendChild(this.span);
}
Greeter.prototype.start = function () {
};

Greeter.prototype.stop = function () {
    clearTimeout(this.timerToken);
};
return Greeter;
})();
window.onload = function () {
   var el = document.getElementById('content');
   var greeter = new Greeter(el);
   greeter.start();
};
var ListBo1x = System.Windows.Controls;
var Action1 = System.Action;
var Date1 = System.DateTimeConventions;

0 个答案:

没有答案