有没有办法在 Typescript 中创建非匿名 AMD 模块。当我定义这样的模块时:
export module Bootstrapper {
export function run() {
var i = 0;
}
}
生成代码是:
define(["require", "exports"], function(require, exports) {
(function (Bootstrapper) {
function run() {
var i = 0;
}
Bootstrapper.run = run;
})(exports.Bootstrapper || (exports.Bootstrapper = {}));
})
如何定义这样的非匿名模块:
define('bootstrapper', ["require", "exports"], function(require, exports) {
(function (Bootstrapper) {
function run() {
var i = 0;
}
Bootstrapper.run = run;
})(exports.Bootstrapper || (exports.Bootstrapper = {}));
})