【发布时间】:2012-10-10 13:04:46
【问题描述】:
有使用 AMD 与 TypeScript 和 dojo AMD 的例子吗?继续获取“3”而不是对象(tslab == 3):
require( ["TypeScriptLab"], function ( tslab )
{
new tslab.Tests().run();
} );
TypeScript 看起来像这样:
export class TypeScriptLab {
test() {
}
}
生成的 JS 如下所示:
define(["require", "exports"], function(require, exports) {
var TypeScriptLab = (function () {
function TypeScriptLab() { }
TypeScriptLab.prototype.test = function () {
};
return TypeScriptLab;
})();
exports.TypeScriptLab = TypeScriptLab;
})
【问题讨论】:
-
忘了说我用的是dojo 1.8.0
标签: dojo typescript amd