mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
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:
parent
75a186e321
commit
5c29416d3e
1 changed files with 8 additions and 0 deletions
|
|
@ -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,
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue