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

Function injectorImportsExprs

packages/compiler-cli/preprocessor/src/processor.ts:3228–3242  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3226 // - OPTIMIZE mode: the resolved+filtered `injectorImports` with `ModuleWithProviders` and
3227 // unfiltered elements spliced back in verbatim (see `buildInjectorImports`).
3228 const injectorImportsExprs = (): o.Expression[] => {
3229 if (emitDeclarationOnly) {
3230 return [];
3231 }
3232 const hasUnresolvedImports = !hasWireImports && !!ngModule.importsSpan;
3233 const hasUnresolvedExports = !hasWireExports && !!ngModule.exportsSpan;
3234 if (!optimize || hasUnresolvedImports || hasUnresolvedExports) {
3235 const rawImportEls = rawExprsFromSpans(ngModule.localImportsElementSpans);
3236 const rawExportEls = rawExprsFromSpans(ngModule.localExportsElementSpans);
3237 if (rawImportEls !== null || rawExportEls !== null) {
3238 return [...(rawImportEls ?? []), ...(rawExportEls ?? [])];
3239 }
3240 }
3241 return buildInjectorImports(ngModule, content, guards);
3242 };
3243
3244 const injectorMeta = {
3245 name: className,

Callers 1

compileNgModuleDefFunction · 0.85

Calls 2

rawExprsFromSpansFunction · 0.85
buildInjectorImportsFunction · 0.85

Tested by

no test coverage detected