(type: any, throwNotFound?: boolean)
| 29 | export function getFactoryDef<T>(type: any, throwNotFound: true): FactoryFn<T>; |
| 30 | export function getFactoryDef<T>(type: any): FactoryFn<T> | null; |
| 31 | export 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 | } |
no test coverage detected
searching dependent graphs…