Skip to content

Commit

Permalink
feat(typescript-plugin): expose FileRegistry to project.program (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
zcf0508 committed Apr 30, 2024
1 parent c24c6a7 commit b42d3c8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/typescript-plugin/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,14 @@ function createLanguageServicePlugin(): ts.server.PluginModuleFactory {
decorateLanguageServiceForVue(language, info.languageService, vueOptions, ts, true);
decorateLanguageServiceHost(ts, language, info.languageServiceHost);
startNamedPipeServer(ts, info.project.projectKind, info.project.getCurrentDirectory());

// #3963
const timer = setInterval(() => {
if (info.project['program']) {
clearInterval(timer);
(info.project['program'] as any).__vue__ = { language };
}
}, 50);
}

return info.languageService;
Expand Down

0 comments on commit b42d3c8

Please sign in to comment.