refactor(language-service): add a plugin factory initialize helper (#55264)

An implementation of a TypeScript server plugin module factory has
been added to the main plugin code which minimizes the amount of
infrastructure code necessary to directly setup the Angular plugin.
This is not yet used externally but can be integrated in the future.

PR Close #55264
This commit is contained in:
Charles Lyding 2024-04-09 12:06:16 -04:00 committed by Pawel Kozlowski
parent 75a186e321
commit 5c29416d3e

View file

@ -275,3 +275,11 @@ export function getExternalFiles(project: ts.server.Project): string[] {
}
return [...typecheckFiles, ...resourceFiles];
}
/** Implementation of a ts.server.PluginModuleFactory */
export function initialize(mod: {typescript: typeof ts}): ts.server.PluginModule {
return {
create,
getExternalFiles,
};
}