* Convert the expression, if present to an `R3ProviderExpression`. * * In JIT mode we do not want the compiler to wrap the expression in a `forwardRef()` call because, * if it is referencing a type that has not yet been defined, it will have already been wrapped in * a `forwardRef()` - either by
( obj: any, property: string, )
| 815 | * use `ForwardRefHandling.None`. |
| 816 | */ |
| 817 | function convertToProviderExpression( |
| 818 | obj: any, |
| 819 | property: string, |
| 820 | ): MaybeForwardRefExpression | undefined { |
| 821 | if (obj.hasOwnProperty(property)) { |
| 822 | return createMayBeForwardRefExpression( |
| 823 | new WrappedNodeExpr(obj[property]), |
| 824 | ForwardRefHandling.None, |
| 825 | ); |
| 826 | } else { |
| 827 | return undefined; |
| 828 | } |
| 829 | } |
| 830 | |
| 831 | function wrapExpression(obj: any, property: string): WrappedNodeExpr<any> | undefined { |
| 832 | if (obj.hasOwnProperty(property)) { |
no test coverage detected
searching dependent graphs…