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

Function icuCreateOpCode

packages/core/src/render3/i18n/i18n_util.ts:157–163  ·  view source on GitHub ↗
(opCode: IcuCreateOpCode, parentIdx: number, refIdx: number)

Source from the content-addressed store, hash-verified

155}
156
157export function icuCreateOpCode(opCode: IcuCreateOpCode, parentIdx: number, refIdx: number) {
158 ngDevMode && assertGreaterThanOrEqual(parentIdx, 0, 'Missing parent index');
159 ngDevMode && assertGreaterThan(refIdx, 0, 'Missing ref index');
160 return (
161 opCode | (parentIdx << IcuCreateOpCode.SHIFT_PARENT) | (refIdx << IcuCreateOpCode.SHIFT_REF)
162 );
163}
164
165// Returns whether the given value corresponds to a root template message,
166// or a sub-template.

Callers 1

addCreateNodeAndAppendFunction · 0.90

Calls 2

assertGreaterThanOrEqualFunction · 0.90
assertGreaterThanFunction · 0.90

Tested by

no test coverage detected