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

Method set

packages/compiler/src/render3/view/util.ts:150–160  ·  view source on GitHub ↗
(key: keyof T, value: o.Expression | null)

Source from the content-addressed store, hash-verified

148 values: {key: string; quoted: boolean; value: o.Expression}[] = [];
149
150 set(key: keyof T, value: o.Expression | null): void {
151 if (value) {
152 const existing = this.values.find((value) => value.key === key);
153
154 if (existing) {
155 existing.value = value;
156 } else {
157 this.values.push({key: key as string, value, quoted: false});
158 }
159 }
160 }
161
162 toLiteralMap(): o.LiteralMapExpr {
163 return o.literalMap(this.values);

Callers 15

compileInjectableFunction · 0.95
compileServiceFunction · 0.95
compileInjectorFunction · 0.95
compileNgModuleFunction · 0.95
createPipeDefinitionMapFunction · 0.95
compileDependencyFunction · 0.95

Calls 2

findMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected