MCPcopy Create free account
hub / github.com/angular/angular / getProjectInfo

Function getProjectInfo

ngp-vscode-ng-language-service/server/src/server.ts:222–237  ·  view source on GitHub ↗
(uri: string)

Source from the content-addressed store, hash-verified

220});
221
222async function getProjectInfo(uri: string) {
223 if (!projectManager || !facade) {
224 connection.console.error('ProjectManager or Facade not initialized!');
225 return null;
226 }
227 if (uri.endsWith('.ngtypecheck.ts')) {
228 return null;
229 }
230 const filePath = fileURLToPath(uri);
231 const project = await projectManager.getProjectForFile(filePath);
232 if (!project) {
233 connection.console.log(`No project found for ${filePath}`);
234 return null;
235 }
236 return {project, filePath, facade, projectManager};
237}
238
239function withProject<P extends {textDocument: {uri: string}}, R>(
240 handler: (params: P, ctx: HandlerContext) => R | Promise<R>,

Callers 2

withProjectFunction · 0.85
server.tsFile · 0.85

Calls 3

getProjectForFileMethod · 0.80
errorMethod · 0.65
logMethod · 0.65

Tested by

no test coverage detected