0

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?

1 Answer 1

1

I think this is the answer.

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

declare module myMod.security {

}
Sign up to request clarification or add additional context in comments.

1 Comment

How would this work if your module name is a string? For example I'm declaring am module for a third party lib: declare module 'ordercloud-javascript-sdk' {}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.