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

How to use ts-morph to make Typescript dependency graph? #679

Closed
HamedFathi opened this issue Aug 10, 2019 · 3 comments
Closed

How to use ts-morph to make Typescript dependency graph? #679

HamedFathi opened this issue Aug 10, 2019 · 3 comments
Labels

Comments

@HamedFathi
Copy link

Hi,

Is it possible to define a directory and an entry point to create a Typescript file dependency graph?

q

Any idea?

@dsherret
Copy link
Owner

There is currently a sourceFile.getReferencingSourceFiles() that returns all the source files that reference the current source file (assuming modules are used). I'm surprised I haven't exposed the opposite of that, so I opened #680.

@HamedFathi
Copy link
Author

@dsherret

Thank you so much for your help. :)

For my scenario, As you mentioned above, I need the opposite of sourceFile.getReferencingSourceFiles();

getReferencingSourceFiles return the parent file but I need all referenced files.

@dsherret
Copy link
Owner

dsherret commented Sep 1, 2019

Closing. Resolution will come in #680.

@dsherret dsherret closed this as completed Sep 1, 2019
@dsherret dsherret reopened this Apr 3, 2021
@dsherret dsherret closed this as completed Apr 3, 2021
Repository owner locked and limited conversation to collaborators Apr 3, 2021
Repository owner unlocked this conversation Apr 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants