typescript-transformer-handbook icon indicating copy to clipboard operation
typescript-transformer-handbook copied to clipboard

Usage question: Following imports

Open stijnbernards opened this issue 4 years ago • 0 comments

Hello,

I've been trying to implement the following imports section this so I can get all interface types from all files. The currently example seems to be broken since using it results the following line in returning undefined: const importSymbol = typeChecker.getSymbolAtLocation(node.moduleSpecifier);

Now my question is I've got the following code:

interface TestComponent extends Component {

}

interface TestComponent3 extends Component {

}

interface TestComponent2 extends TestComponent3 {

}

interface TestEntity extends TestComponent, Entity, TestComponent2 {

}

const testEntity: TestEntity = {}

I want to inject all interface types from all files in the testEntity constant. It's correctly working for the current file now but it does not seem to follow any imports. I've wasted hours trying to get the imported sourceFile AST but I can't seem to get it to work.

Any advice?

Thanks in advance!

stijnbernards avatar Sep 02 '20 19:09 stijnbernards