TypeScript / JavaScript - import all types

后端 未结 2 717
萌比男神i
萌比男神i 2021-02-04 23:09

How can I import all types from certain file?

Let\'s say I have myClass.ts and otherClass.ts. I want to import all classes from otherClas

2条回答
  •  天涯浪人
    2021-02-04 23:53

    You can use triple slashes import:

    /// 
    

    They must have to be the on the first line(s) of the file.

    1. When do I need a triple slash reference?
    2. https://www.typescriptlang.org/docs/handbook/triple-slash-directives.html

提交回复
热议问题