MCPcopy
hub / github.com/angular/angular / computeCombinedExports

Function computeCombinedExports

packages/core/src/render3/jit/module.ts:475–495  ·  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

473 * @param type
474 */
475function computeCombinedExports(type: Type<any>): Type<any>[] {
476 type = resolveForwardRef(type);
477 const ngModuleDef = getNgModuleDef(type);
478
479 // a standalone component, directive or pipe
480 if (ngModuleDef === null) {
481 return [type];
482 }
483
484 return flatten(
485 maybeUnwrapFn(ngModuleDef.exports).map((type) => {
486 const ngModuleDef = getNgModuleDef(type);
487 if (ngModuleDef) {
488 verifySemanticsOfNgModuleDef(type as any as NgModuleType, false);
489 return computeCombinedExports(type);
490 } else {
491 return type;
492 }
493 }),
494 );
495}
496
497/**
498 * 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

Used in the wild real call sites across dependent graphs

searching dependent graphs…