tsc 编译具有指定模块 ID 的 AMD 模块

tsc compile AMD module with specified module id

是否可以配置 typescript 编译器来编译导出的 class 并定义模块 ID?

打字稿

export class Foo {...}

这是 tsc 的输出(模块:"amd")

define(["require", "exports"], function (require, exports) {...}

预计

define("Foo", ["require", "exports"], function (require, exports) {...}

非常感谢

expected define("Foo")

使用超级机密/// <amd-module name="Foo"/>

但我建议不要这样做,因为它会使您的代码不必要地变得特定。