[英]Typescript module declaration over multiple d.ts files
So if I have my main .d.ts
definition: 因此,如果我有主要的.d.ts
定义:
main.d.ts
: main.d.ts
:
declare module myMod {
}
And say I wanted to have my securty definitions in another file but under the same module. 并说我想将我的安全性定义放在另一个文件中,但在同一模块下。 My thought: 我的想法:
main.security.d.ts
: main.security.d.ts
:
declare module myMod {
module security {
}
}
How would you make this work? 您将如何进行这项工作?
I think this is the answer. 我认为这就是答案。
Declare in the security d.ts
the module
. 声明在安全d.ts
的module
。 name
. name
。 So in my case: 因此,就我而言:
declare module myMod.security {
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.