MCPcopy Index your code
hub / github.com/angular/angular / findTightestNode

Function findTightestNode

packages/language-service/src/utils/ts_utils.ts:31–36  ·  view source on GitHub ↗
(node: ts.Node, position: number)

Source from the content-addressed store, hash-verified

29 * @param position The target position within the `node`.
30 */
31export function findTightestNode(node: ts.Node, position: number): ts.Node | undefined {
32 if (node.getStart() <= position && position < node.getEnd()) {
33 return node.forEachChild((c) => findTightestNode(c, position)) ?? node;
34 }
35 return undefined;
36}
37
38export interface FindOptions<T extends ts.Node> {
39 filter: (node: ts.Node) => node is T;

Callers 15

getMemberMethodNamesFunction · 0.90
getTsNodeAtPositionMethod · 0.90
getTsNodeAtPositionMethod · 0.90
getSignatureHelpFunction · 0.90
isApplicableFunction · 0.90
computeEditsForFixFunction · 0.90
isApplicableFunction · 0.90
computeEditsForFixFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…