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

Function onGetTcb

ngp-vscode-ng-language-service/server/src/handlers/tcb.ts:12–28  ·  view source on GitHub ↗
(params: any, context: HandlerContext)

Source from the content-addressed store, hash-verified

10import {HandlerContext} from './utils.js';
11
12export async function onGetTcb(params: any, context: HandlerContext) {
13 if (!params.textDocument?.uri?.startsWith('file:')) {
14 return null;
15 }
16
17 const filePath = fileURLToPath(params.textDocument.uri);
18 const result = await context.languageService.getTcb(filePath, params.position);
19 if (!result) {
20 return null;
21 }
22
23 return {
24 uri: params.textDocument.uri,
25 content: result.code,
26 selections: result.selections,
27 };
28}

Callers

nothing calls this directly

Calls 1

getTcbMethod · 0.65

Tested by

no test coverage detected