MCPcopy
hub / github.com/angular/angular / getOpCodes

Function getOpCodes

packages/core/test/render3/i18n/i18n_spec.ts:70–86  ·  view source on GitHub ↗
(
    messageOrAtrs: string | string[],
    createTemplate: () => void,
    decls: number,
    index: number,
  )

Source from the content-addressed store, hash-verified

68 let tView: TView;
69
70 function getOpCodes(
71 messageOrAtrs: string | string[],
72 createTemplate: () => void,
73 decls: number,
74 index: number,
75 ): TI18n | I18nUpdateOpCodes {
76 const fixture = new ViewFixture({decls, consts: [messageOrAtrs]});
77 fixture.enterView();
78 createTemplate();
79
80 // Make `tView` available for tests.
81 tView = fixture.tView;
82 const opCodes = fixture.tView.data[index] as TI18n | I18nUpdateOpCodes;
83
84 ViewFixture.cleanUp();
85 return opCodes;
86 }
87
88 describe('i18nStart', () => {
89 it('for text', () => {

Callers 1

i18n_spec.tsFile · 0.85

Calls 3

enterViewMethod · 0.95
createTemplateFunction · 0.85
cleanUpMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…