You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 16, 2020. It is now read-only.
Repository navigation
This repository was archived by the owner on Oct 16, 2020. It is now read-only.
Right now, ProjectConfiguration.reset() unsets everything including the Program and TypeScriptService. Then the next call to init() will initialize everything from scratch. This is called by refreshFileTree(), which is called for example after dependency installation.
Afaik, this is not the intended usage. When creating a Program, you are supposed to pass in an old Program, and SourceFiles etc that can be reused and didn't change can be reused. I don't think the LanguageService should be destroyed.
When creating a Program, you are supposed to pass in an old Program, and SourceFiles etc that can be reused and didn't change can be reused.
Yeah, but the devil is in the detail. One cannot simply pass ts.createCompilerHost(...) to ts.createProgram(..), you should construct proper instance of CompilerHost object which is a large part of LanguageService::getProgram()
Right now,
ProjectConfiguration.reset()unsets everything including theProgramandTypeScriptService. Then the next call toinit()will initialize everything from scratch. This is called byrefreshFileTree(), which is called for example after dependency installation.Afaik, this is not the intended usage. When creating a
Program, you are supposed to pass in an oldProgram, and SourceFiles etc that can be reused and didn't change can be reused. I don't think the LanguageService should be destroyed.