Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
Description
Overview
Right now,createIsolatedProgram creates ats.Program with minimal type info behind the scenes:
typescript-eslint/packages/typescript-estree/src/create-program/createIsolatedProgram.ts
Line 63 in09c04fb
| constprogram=ts.createProgram( |
In theory, the services without a specified project path don’t need to make their own Program. That program was used for the experimental unused variables rule, to get program diagnostics such as unused var diagnostics... but this can take dozens of ms a file, and is rarely used by anybody.
Creating a standalone program that way isn'tvery expensive, but it would be nice to avoid. We should investigate whether we can get rid of it altogether.
The tricky thing here is parser types: some internal code expectsASTAndProgram instances from the parsing results. In this new world, there may not be theprogram from there.
Marking as accepting PRs with the caveat that everything still has to work as expected. Which may or may not be doable. Good luck! 😄
This issue is from a pairing I had with@bradzacher going over the parser internals.