Czy istnieje sposób na tworzenie nieanonimowych modułów AMD w maszynie do pisania. Kiedy zdefiniować moduł tak:Tworzenie nieanonimowych modułów AMD w TypeScript
export module Bootstrapper {
export function run() {
var i = 0;
}
}
kodu generuje to:
define(["require", "exports"], function(require, exports) {
(function (Bootstrapper) {
function run() {
var i = 0;
}
Bootstrapper.run = run;
})(exports.Bootstrapper || (exports.Bootstrapper = {}));
})
Jak można zdefiniować zakaz anomymous moduł tak:
define('bootstrapper', ["require", "exports"], function(require, exports) {
(function (Bootstrapper) {
function run() {
var i = 0;
}
Bootstrapper.run = run;
})(exports.Bootstrapper || (exports.Bootstrapper = {}));
})
zawsze można napisać kod requirejs ręką –