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

Function computeCombinedExports

packages/core/src/render3/jit/module.ts:490–510  ·  view source on GitHub ↗

* Computes the combined declarations of explicit declarations, as well as declarations inherited by * traversing the exports of imported modules. * @param type

(type: Type<any>)

Source from the content-addressed store, hash-verified

488 * @param type
489 */
490function computeCombinedExports(type: Type<any>): Type<any>[] {
491 type = resolveForwardRef(type);
492 const ngModuleDef = getNgModuleDef(type);
493
494 // a standalone component, directive or pipe
495 if (ngModuleDef === null) {
496 return [type];
497 }
498
499 return flatten(
500 maybeUnwrapFn(ngModuleDef.exports).map((type) => {
501 const ngModuleDef = getNgModuleDef(type);
502 if (ngModuleDef) {
503 verifySemanticsOfNgModuleDef(type as any as NgModuleType, false);
504 return computeCombinedExports(type);
505 } else {
506 return type;
507 }
508 }),
509 );
510}
511
512/**
513 * Some declared components may be compiled asynchronously, and thus may not have their

Callers

nothing calls this directly

Calls 6

resolveForwardRefFunction · 0.90
getNgModuleDefFunction · 0.90
flattenFunction · 0.90
maybeUnwrapFnFunction · 0.90
mapMethod · 0.80

Tested by

no test coverage detected