Using namespace spread over multiple module files in TypeScript

后端 未结 5 923

I\'ve started work on a large-scale typescript project.

Right from the outset, I want to keep my files organized (this project will be split between lots of developers

5条回答
  •  被撕碎了的回忆
    2021-01-31 09:08

    If you have your own library and you want to export the multiple files like from namespace, you can do this:

    // index.ts
    import * as Animals from './animals';
    export { Animals };
    

提交回复
热议问题