* 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, )
| 817 | * use `ForwardRefHandling.None`. |
| 818 | */ |
| 819 | function convertToProviderExpression( |
| 820 | obj: any, |
| 821 | property: string, |
| 822 | ): MaybeForwardRefExpression | undefined { |
| 823 | if (Object.hasOwn(obj, property)) { |
| 824 | return createMayBeForwardRefExpression( |
| 825 | new WrappedNodeExpr(obj[property]), |
| 826 | ForwardRefHandling.None, |
| 827 | ); |
| 828 | } else { |
| 829 | return undefined; |
| 830 | } |
| 831 | } |
| 832 | |
| 833 | function wrapExpression(obj: any, property: string): WrappedNodeExpr<any> | undefined { |
| 834 | if (Object.hasOwn(obj, property)) { |
no test coverage detected