(fileName: string, position: number)
| 438 | } |
| 439 | |
| 440 | async getInterfaceAST(fileName: string, position: number): Promise<DumpedInterface> { |
| 441 | const openedFile = this.getOpenedFile(fileName); |
| 442 | const node = findNode(openedFile.sourceFile, position, (node) => ts.isInterfaceDeclaration(node)); |
| 443 | if (!node) { |
| 444 | throw new Error(`Could not resolve interface declaration at position ${position}`); |
| 445 | } |
| 446 | |
| 447 | const references: AST.TypeReference[] = []; |
| 448 | |
| 449 | const dumpedInterface = dumpInterface(node as ts.InterfaceDeclaration, { |
| 450 | typeChecker: openedFile.workspaceProject.typeChecker, |
| 451 | references, |
| 452 | }); |
| 453 | |
| 454 | return { |
| 455 | interface: dumpedInterface, |
| 456 | references, |
| 457 | }; |
| 458 | } |
| 459 | |
| 460 | async getFunctionAST(fileName: string, position: number): Promise<DumpFunctionResponseBody> { |
| 461 | const openedFile = this.getOpenedFile(fileName); |
nothing calls this directly
no test coverage detected