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

Function convertToProviderExpression

packages/compiler/src/jit_compiler_facade.ts:817–829  ·  view source on GitHub ↗

* 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,
)

Source from the content-addressed store, hash-verified

815 * use `ForwardRefHandling.None`.
816 */
817function 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
831function wrapExpression(obj: any, property: string): WrappedNodeExpr<any> | undefined {
832 if (obj.hasOwnProperty(property)) {

Callers 2

compileInjectableMethod · 0.85

Calls 1

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…