.js中存在重复的标识符错误。在VS代码中编译代码这里是我的.ts文件我使用VS代码0.5和typescript 1.5.3,行exports.User = User
中有错误它抱怨重复:
import store = require("store/mongo")
export class User {
public connectionId: string;
public telegram_user: telegram.User;
addToPoolDb(next): void {
store.addToPoolDb(this, function(err) {
next(err);
});
}
}
这是输出:
var store = require("store/mongo");
var User = (function () {
function User() {
}
User.prototype.addToPoolDb = function (next) {
store.addToPoolDb(this, function (err) {
next(err);
});
};
return User;
})();
exports.User = User;