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

Function setTIcu

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

Source from the content-addressed store, hash-verified

79 * @param tIcu The TIcu to store.
80 */
81export function setTIcu(tView: TView, index: number, tIcu: TIcu): void {
82 const tNode = tView.data[index] as null | TIcuContainerNode;
83 ngDevMode &&
84 assertEqual(
85 tNode === null || Object.hasOwn(tNode, TVIEW),
86 true,
87 "We expect to get 'null'|'TIcuContainer'",
88 );
89 if (tNode === null) {
90 tView.data[index] = tIcu;
91 } else {
92 ngDevMode && assertTNodeType(tNode, TNodeType.Icu);
93 tNode.value = tIcu;
94 }
95}
96
97/**
98 * 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