How to declare and import typescript interfaces in a separate file

Posted by Editorial Staff | Updated on

If you want to declare and import typescript interfaces in a separate file. You need to export the interface from the file in which is defined and import it wherever you want to use it.

In IfcSampleInterface.ts:

In SampleInterface.ts


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers