(nonCtorExpr: o.Expression)
| 145 | let retExpr: o.Expression | null = null; |
| 146 | |
| 147 | function makeConditionalFactory(nonCtorExpr: o.Expression): o.ReadVarExpr { |
| 148 | const r = o.variable('__ngConditionalFactory__'); |
| 149 | body.push(new o.DeclareVarStmt(r.name, o.NULL_EXPR, o.DYNAMIC_TYPE)); |
| 150 | const ctorStmt = |
| 151 | ctorExpr !== null |
| 152 | ? r.set(ctorExpr).toStmt(factoryComments) |
| 153 | : o.importExpr(R3.invalidFactory).callFn([]).toStmt(); |
| 154 | // Always add a `ts-ignore` on the alternate factory. |
| 155 | body.push(o.ifStmt(t, [ctorStmt], [r.set(nonCtorExpr).toStmt([tsIgnoreComment()])])); |
| 156 | return r; |
| 157 | } |
| 158 | |
| 159 | if (isDelegatedFactoryMetadata(meta)) { |
| 160 | // This type is created with a delegated factory. If a type parameter is not specified, call |
no test coverage detected
searching dependent graphs…