(uri: string)
| 220 | }); |
| 221 | |
| 222 | async 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 | |
| 239 | function withProject<P extends {textDocument: {uri: string}}, R>( |
| 240 | handler: (params: P, ctx: HandlerContext) => R | Promise<R>, |
no test coverage detected