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

Function getFactoryDef

packages/core/src/render3/definition_factory.ts:31–37  ·  view source on GitHub ↗
(type: any, throwNotFound?: boolean)

Source from the content-addressed store, hash-verified

29export function getFactoryDef<T>(type: any, throwNotFound: true): FactoryFn<T>;
30export function getFactoryDef<T>(type: any): FactoryFn<T> | null;
31export function getFactoryDef<T>(type: any, throwNotFound?: boolean): FactoryFn<T> | null {
32 const hasFactoryDef = type.hasOwnProperty(NG_FACTORY_DEF);
33 if (!hasFactoryDef && throwNotFound === true && ngDevMode) {
34 throw new Error(`Type ${stringify(type)} does not have 'ɵfac' property.`);
35 }
36 return hasFactoryDef ? type[NG_FACTORY_DEF] : null;
37}

Callers 6

walkProviderTreeFunction · 0.90
providerToFactoryFunction · 0.90
ɵɵpipeFunction · 0.90
getFactoryOfFunction · 0.90

Calls 1

stringifyFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…