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

Function getFactoryOf

packages/core/src/render3/di.ts:951–959  ·  view source on GitHub ↗
(type: Type<any>)

Source from the content-addressed store, hash-verified

949}
950
951function getFactoryOf<T>(type: Type<any>): ((type?: Type<T>) => T | null) | null {
952 if (isForwardRef(type)) {
953 return () => {
954 const factory = getFactoryOf<T>(resolveForwardRef(type));
955 return factory && factory();
956 };
957 }
958 return getFactoryDef<T>(type);
959}
960
961/**
962 * Returns a value from the closest embedded or node injector.

Callers 1

ɵɵgetInheritedFactoryFunction · 0.85

Calls 4

isForwardRefFunction · 0.90
resolveForwardRefFunction · 0.90
getFactoryDefFunction · 0.90
factoryFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…