Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Usage question: Following imports #20

Open
stijnbernards opened this issue Sep 2, 2020 · 0 comments
Open

Usage question: Following imports #20

stijnbernards opened this issue Sep 2, 2020 · 0 comments

Comments

@stijnbernards
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant