Skip to content

Externalize collectExternalModuleReferences #9289

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

Closed
s-panferov opened this issue Jun 21, 2016 · 1 comment
Closed

Externalize collectExternalModuleReferences #9289

s-panferov opened this issue Jun 21, 2016 · 1 comment
Labels
Needs More Info The issue still hasn't been fully clarified Suggestion An idea for TypeScript

Comments

@s-panferov
Copy link

s-panferov commented Jun 21, 2016

Refs #9017

Right now there is no way to extract external dependencies from SourceFile. This is useful for tools like awesome-typescript-loader to track files dependencies and trigger rebuils on changed files.

I propose to make collectExternalModuleReferences function from program.ts to became public for external users or add overload to preProcessFile to take existing SourceFile.

@RyanCavanaugh RyanCavanaugh added Suggestion An idea for TypeScript Needs More Info The issue still hasn't been fully clarified labels Aug 18, 2016
@RyanCavanaugh
Copy link
Member

You can already simply walk the source tree (see here https://github.com/Microsoft/types-publisher/blob/master/src/lib/definition-parser.ts#L240 ) to collect the import statements. Is there extra information only the TS compiler itself could provide?

@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Needs More Info The issue still hasn't been fully clarified Suggestion An idea for TypeScript
Projects
None yet
Development

No branches or pull requests

2 participants