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

Function setTIcu

packages/core/src/render3/i18n/i18n_util.ts:73–87  ·  view source on GitHub ↗
(tView: TView, index: number, tIcu: TIcu)

Source from the content-addressed store, hash-verified

71 * @param tIcu The TIcu to store.
72 */
73export function setTIcu(tView: TView, index: number, tIcu: TIcu): void {
74 const tNode = tView.data[index] as null | TIcuContainerNode;
75 ngDevMode &&
76 assertEqual(
77 tNode === null || tNode.hasOwnProperty('tView'),
78 true,
79 "We expect to get 'null'|'TIcuContainer'",
80 );
81 if (tNode === null) {
82 tView.data[index] = tIcu;
83 } else {
84 ngDevMode && assertTNodeType(tNode, TNodeType.Icu);
85 tNode.value = tIcu;
86 }
87}
88
89/**
90 * Set `TNode.insertBeforeIndex` taking the `Array` into account.

Callers 1

icuStartFunction · 0.90

Calls 2

assertEqualFunction · 0.90
assertTNodeTypeFunction · 0.90

Tested by

no test coverage detected