C'è un modo per creare moduli AMD non anonimi in Typescript. Quando mi definisco un modulo come questo:Creazione di moduli AMD non anonimi in TypeScript
export module Bootstrapper {
export function run() {
var i = 0;
}
}
il codice generano è:
define(["require", "exports"], function(require, exports) {
(function (Bootstrapper) {
function run() {
var i = 0;
}
Bootstrapper.run = run;
})(exports.Bootstrapper || (exports.Bootstrapper = {}));
})
Come posso definire un modulo non anomymous come questo:
define('bootstrapper', ["require", "exports"], function(require, exports) {
(function (Bootstrapper) {
function run() {
var i = 0;
}
Bootstrapper.run = run;
})(exports.Bootstrapper || (exports.Bootstrapper = {}));
})
si può sempre scrivere il codice a mano requirejs –