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

Function serializeI18nBlock

packages/core/src/hydration/i18n.ts:212–229  ·  view source on GitHub ↗
(
  lView: LView,
  serializedI18nBlock: SerializedI18nBlock,
  context: HydrationContext,
  nodes: I18nNode[],
)

Source from the content-addressed store, hash-verified

210}
211
212function serializeI18nBlock(
213 lView: LView,
214 serializedI18nBlock: SerializedI18nBlock,
215 context: HydrationContext,
216 nodes: I18nNode[],
217): Node | null {
218 let prevRNode = null;
219 for (const node of nodes) {
220 const nextRNode = serializeI18nNode(lView, serializedI18nBlock, context, node);
221 if (nextRNode) {
222 if (isDisjointNode(prevRNode, nextRNode)) {
223 serializedI18nBlock.disjointNodes.add(node.index - HEADER_OFFSET);
224 }
225 prevRNode = nextRNode;
226 }
227 }
228 return prevRNode;
229}
230
231/**
232 * Helper to determine whether the given nodes are "disjoint".

Callers 2

trySerializeI18nBlockFunction · 0.85
serializeI18nNodeFunction · 0.85

Calls 3

serializeI18nNodeFunction · 0.85
isDisjointNodeFunction · 0.85
addMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…