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

Function templateBase

packages/compiler/src/template/pipeline/src/instruction.ts:99–126  ·  view source on GitHub ↗
(
  instruction: o.ExternalReference,
  slot: number,
  templateFnRef: o.Expression,
  decls: number,
  vars: number,
  tag: string | null,
  constIndex: number | null,
  localRefs: number | null,
  sourceSpan: ParseSourceSpan,
)

Source from the content-addressed store, hash-verified

97}
98
99function templateBase(
100 instruction: o.ExternalReference,
101 slot: number,
102 templateFnRef: o.Expression,
103 decls: number,
104 vars: number,
105 tag: string | null,
106 constIndex: number | null,
107 localRefs: number | null,
108 sourceSpan: ParseSourceSpan,
109): ir.CreateOp {
110 const args = [
111 o.literal(slot),
112 templateFnRef,
113 o.literal(decls),
114 o.literal(vars),
115 o.literal(tag),
116 o.literal(constIndex),
117 ];
118 if (localRefs !== null) {
119 args.push(o.literal(localRefs));
120 args.push(o.importExpr(Identifiers.templateRefExtractor));
121 }
122 while (args[args.length - 1].isEquivalent(o.NULL_EXPR)) {
123 args.pop();
124 }
125 return call(instruction, args, sourceSpan);
126}
127
128function propertyBase(
129 instruction: o.ExternalReference,

Callers 2

templateFunction · 0.85
domTemplateFunction · 0.85

Calls 4

callFunction · 0.85
popMethod · 0.80
pushMethod · 0.45
isEquivalentMethod · 0.45

Tested by

no test coverage detected