我想知道将(ab)use模块用作Typescript中的命名空间的建议。以下代码段是常见做法吗?或者,还有更好的方法:
module Blend {
export module layout {
export module container {
export module box {
export class Box extends Blend.layout.container.Layout {
}
}
}
}
}
是的,没关系。您可以使用嵌套模块在Typescript中实现分层名称空间。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句