Callum Linington
Callum Linington

Reputation: 14417

Typescript module declaration over multiple d.ts files

So if I have my main .d.ts definition:

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:

declare module myMod {
    module security {

    }
}

How would you make this work?

Upvotes: 0

Views: 1284

Answers (1)

Callum Linington
Callum Linington

Reputation: 14417

I think this is the answer.

Declare in the security d.ts the module.name. So in my case:

declare module myMod.security {

}

Upvotes: 1

Related Questions