MCPcopy Create free account
hub / github.com/angular/angular / compileFactoryField

Function compileFactoryField

packages/compiler-cli/preprocessor/src/processor.ts:3505–3519  ·  view source on GitHub ↗
(
  factoryRes: any,
  printer: ExpressionPrinter,
  ctx: HybridCompilerContext,
)

Source from the content-addressed store, hash-verified

3503}
3504
3505function compileFactoryField(
3506 factoryRes: any,
3507 printer: ExpressionPrinter,
3508 ctx: HybridCompilerContext,
3509): string {
3510 const factoryIsPure =
3511 factoryRes.expression instanceof o.InvokeFunctionExpr && factoryRes.expression.pure;
3512 return createStaticField(
3513 'ɵfac',
3514 printer.print(factoryRes.expression),
3515 printer.emitTypes ? printer.printType(factoryRes.type) : null,
3516 factoryIsPure,
3517 ctx.isClosureCompilerEnabled,
3518 );
3519}
3520
3521type DeclarationListEmitModeType =
3522 (typeof DeclarationListEmitMode)[keyof typeof DeclarationListEmitMode];

Callers 1

appendCompiledClassFunction · 0.85

Calls 3

createStaticFieldFunction · 0.85
printTypeMethod · 0.80
printMethod · 0.45

Tested by

no test coverage detected