MCPcopy
hub / github.com/angular/angular / provideWith

Method provideWith

packages/benchpress/src/metric/multi_metric.ts:14–27  ·  view source on GitHub ↗
(childTokens: any[])

Source from the content-addressed store, hash-verified

12
13export class MultiMetric extends Metric {
14 static provideWith(childTokens: any[]): any[] {
15 return [
16 {
17 provide: _CHILDREN,
18 useFactory: (injector: Injector) => childTokens.map((token) => injector.get(token)),
19 deps: [Injector],
20 },
21 {
22 provide: MultiMetric,
23 useFactory: (children: Metric[]) => new MultiMetric(children),
24 deps: [_CHILDREN],
25 },
26 ];
27 }
28
29 constructor(private _metrics: Metric[]) {
30 super();

Callers 4

createReportersFunction · 0.45
createMetricFunction · 0.45
runner.tsFile · 0.45
_prepareBenchpressSetupFunction · 0.45

Calls 2

mapMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected