Start language service integration. #118
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello,
Please don't merge this. This is a work in progress. I just want to see if this would be something you'd be likely to merge in and to get some initial feedback.
What I'd like to do is integrate the TypeScript language service into this package. This solves #112.
I was encountering poor performance on projects that hit large numbers of components (80+). I've reused the code from
ts-loader
(https://github.com/TypeStrong/ts-loader/blob/master/src/servicesHost.ts) to create a reusable instance ofts.Program
. On one especially large project, I saw a drop from multiple minutes to about 30 seconds.Issues needing resolving:
We can select which behavior to use (file by file or language service) by requesting a service host instance or creating a ts.Program.
parser.ts
: