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

Function locateI18nRNodeByIndex

packages/core/src/hydration/node_lookup_utils.ts:80–89  ·  view source on GitHub ↗
(
  hydrationInfo: DehydratedView,
  noOffsetIndex: number,
)

Source from the content-addressed store, hash-verified

78 * @returns an RNode that corresponds to the instruction index
79 */
80export function locateI18nRNodeByIndex<T extends RNode>(
81 hydrationInfo: DehydratedView,
82 noOffsetIndex: number,
83): T | null | undefined {
84 const i18nNodes = hydrationInfo.i18nNodes;
85 if (i18nNodes) {
86 return i18nNodes.get(noOffsetIndex) as T | null | undefined;
87 }
88 return undefined;
89}
90
91/**
92 * Attempt to locate an RNode by a path, if it exists.

Callers 2

locateOrCreateNodeImplFunction · 0.90
locateNextRNodeFunction · 0.85

Calls 1

getMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…