mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08: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:
committed by
Pawel Kozlowski
parent
75a186e321
commit
5c29416d3e
@@ -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,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user