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

Function multiFactoryAdd

packages/core/src/render3/di_setup.ts:296–305  ·  view source on GitHub ↗

* Add a factory in a multi factory. * @returns Index at which the factory was inserted.

(
  multiFactory: NodeInjectorFactory,
  factory: () => any,
  isComponentProvider: boolean,
)

Source from the content-addressed store, hash-verified

294 * @returns Index at which the factory was inserted.
295 */
296function multiFactoryAdd(
297 multiFactory: NodeInjectorFactory,
298 factory: () => any,
299 isComponentProvider: boolean,
300): number {
301 if (isComponentProvider) {
302 multiFactory.componentProviders!++;
303 }
304 return multiFactory.multi!.push(factory) - 1;
305}
306
307/**
308 * Returns the index of item in the array, but only in the begin to end range.

Callers 2

resolveProviderFunction · 0.85
multiFactoryFunction · 0.85

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…