How to split large typescript index.d.ts file

Our application has many objects and such like that we can roughly break down into 3 categories; 'core', 'app' and 'objects'.

I followed a basic Typescript tutorial online and currently there is a single index.d.ts which has this kind of layout:

interface AH {

}

declare var ah: AH;

declare module 'ah' {
export = ah;
}

declare module ah {

module objects {
// much objects
}

module app {
//many app
}

module core {
//such core
}
}

However due to the archaic source control we use, it would be beneficial to break this single file out to 3 separate files for app, core and objects, having the "namespaces" available as ah.app.blah, ah.core.blah and ah.objects.blah.

If you are not using this library in another project, there is no need the declare modules.

It seems like you have two options here:

Export the type declarations you want to expose in separate files, and import them when you need them. As this seems to be the most common practice, also when you are handling external modules, I think this has my personal preference.