I am trying to write typescript definitions for an existing project that's written in ES6.
It exports an object with several classes, like:
export { default as Game } from './Game/Game';
export { default as Pool } from './Util/Pool';
Game is an ES6 class or object.
Rather than putting everything into a huge index.d.ts file with a big namespace, I'd like to have each class/object definition into its own file.
Can I do that ? how am I supposed to do that?
Right now, this is how my directory structure looks like:
// that's the JavaScript module I am using
node_modules/athenajs
// that's the new file I have created that will contain my typescript definitions
js/athenajs/@types/athenajs/index.d.ts
// that's the sample app I created to test my definitions
js/index.ts
Everything seems to be ok: when typing tsc -p . it correctly attempts to compile the file and correctly detects the index.d.ts file.
The question is: how can I split my definition into several .d.ts files, for example one for the definitions of the Game class, one for the Pool one, and so on, and import all into a global definition file?