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

Function isWithinKeyValue

packages/language-service/src/utils/index.ts:93–101  ·  view source on GitHub ↗
(position: number, node: NodeWithKeyAndValue)

Source from the content-addressed store, hash-verified

91}
92
93export function isWithinKeyValue(position: number, node: NodeWithKeyAndValue): boolean {
94 let {keySpan, valueSpan} = node;
95 if (valueSpan === undefined && node instanceof TmplAstBoundEvent) {
96 valueSpan = node.handlerSpan;
97 }
98 const isWithinKeyValue =
99 isWithin(position, keySpan) || !!(valueSpan && isWithin(position, valueSpan));
100 return isWithinKeyValue;
101}
102
103export function isTemplateNode(node: TmplAstNode | AST): node is TmplAstNode {
104 // Template node implements the Node interface so we cannot use instanceof.

Callers 1

visitMethod · 0.90

Calls 1

isWithinFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…