Skip to content

Commit 5c29416

Browse files
clydinpkozlowski-opensource
authored andcommitted
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
1 parent 75a186e commit 5c29416

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

packages/language-service/src/ts_plugin.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,3 +275,11 @@ export function getExternalFiles(project: ts.server.Project): string[] {
275275
}
276276
return [...typecheckFiles, ...resourceFiles];
277277
}
278+
279+
/** Implementation of a ts.server.PluginModuleFactory */
280+
export function initialize(mod: {typescript: typeof ts}): ts.server.PluginModule {
281+
return {
282+
create,
283+
getExternalFiles,
284+
};
285+
}

0 commit comments

Comments
 (0)