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

Function i18nRemoveOpCodesToString

packages/core/src/render3/i18n/i18n_debug.ts:190–209  ·  view source on GitHub ↗
(
  this: I18nRemoveOpCodes | void,
  opcodes?: I18nRemoveOpCodes,
)

Source from the content-addressed store, hash-verified

188 * @param opcodes `I18nRemoveOpCodes` if invoked as a function.
189 */
190export function i18nRemoveOpCodesToString(
191 this: I18nRemoveOpCodes | void,
192 opcodes?: I18nRemoveOpCodes,
193): string[] {
194 const removeCodes = opcodes || (Array.isArray(this) ? this : []);
195 let lines: string[] = [];
196
197 for (let i = 0; i < removeCodes.length; i++) {
198 const nodeOrIcuIndex = removeCodes[i] as number;
199 if (nodeOrIcuIndex > 0) {
200 // Positive numbers are `RNode`s.
201 lines.push(`remove(lView[${nodeOrIcuIndex}])`);
202 } else {
203 // Negative numbers are ICUs
204 lines.push(`removeNestedICU(${~nodeOrIcuIndex})`);
205 }
206 }
207
208 return lines;
209}
210
211class OpCodeParser {
212 i: number = 0;

Callers 1

i18n_debug_spec.tsFile · 0.90

Calls 2

isArrayMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…