Reputation: 973
I have a typescript module/class which utilizes bunch of import statements. I want to move them into separate file and import that file. Tried doing that no luck. Is there anyway can i do this in typescript ?
Upvotes: 1
Views: 244
Reputation: 973
Figured the solution. All I need to do was include another file called reference.ts with following code
/// <reference path="the modules or ts file you want import"/>
****export the modules here****
export * from './filePath';
And import this reference file, where you need the imports statements for the modules listed in this file.
Upvotes: 1