mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
Revert "feat(compiler-cli): exclude abstract classes from strictInjectionParameters requirement (#44615)" (#45862)
This reverts commit 9cf14ff03d.
PR Close #45862
This commit is contained in:
@@ -10,13 +10,12 @@ import ts from 'typescript';
|
||||
|
||||
import {ParsedConfiguration} from '../../..';
|
||||
import {ComponentDecoratorHandler, DirectiveDecoratorHandler, InjectableDecoratorHandler, NgModuleDecoratorHandler, PipeDecoratorHandler, ReferencesRegistry, ResourceLoader} from '../../../src/ngtsc/annotations';
|
||||
import {InjectableClassRegistry} from '../../../src/ngtsc/annotations/common';
|
||||
import {CycleAnalyzer, CycleHandlingStrategy, ImportGraph} from '../../../src/ngtsc/cycles';
|
||||
import {isFatalDiagnosticError} from '../../../src/ngtsc/diagnostics';
|
||||
import {absoluteFromSourceFile, LogicalFileSystem, ReadonlyFileSystem} from '../../../src/ngtsc/file_system';
|
||||
import {AbsoluteModuleStrategy, LocalIdentifierStrategy, LogicalProjectStrategy, ModuleResolver, PrivateExportAliasingHost, Reexport, ReferenceEmitter} from '../../../src/ngtsc/imports';
|
||||
import {SemanticSymbol} from '../../../src/ngtsc/incremental/semantic_graph';
|
||||
import {CompoundMetadataReader, CompoundMetadataRegistry, DtsMetadataReader, LocalMetadataRegistry, ResourceRegistry} from '../../../src/ngtsc/metadata';
|
||||
import {CompoundMetadataReader, CompoundMetadataRegistry, DtsMetadataReader, InjectableClassRegistry, LocalMetadataRegistry, ResourceRegistry} from '../../../src/ngtsc/metadata';
|
||||
import {PartialEvaluator} from '../../../src/ngtsc/partial_evaluator';
|
||||
import {NOOP_PERF_RECORDER} from '../../../src/ngtsc/perf';
|
||||
import {LocalModuleScopeRegistry, MetadataDtsModuleScopeResolver, TypeCheckScopeRegistry} from '../../../src/ngtsc/scope';
|
||||
@@ -98,15 +97,14 @@ export class DecorationAnalyzer {
|
||||
new PartialEvaluator(this.reflectionHost, this.typeChecker, /* dependencyTracker */ null);
|
||||
importGraph = new ImportGraph(this.typeChecker, NOOP_PERF_RECORDER);
|
||||
cycleAnalyzer = new CycleAnalyzer(this.importGraph);
|
||||
injectableRegistry = new InjectableClassRegistry(this.reflectionHost, this.isCore);
|
||||
injectableRegistry = new InjectableClassRegistry(this.reflectionHost);
|
||||
typeCheckScopeRegistry = new TypeCheckScopeRegistry(this.scopeRegistry, this.fullMetaReader);
|
||||
handlers: DecoratorHandler<unknown, unknown, SemanticSymbol|null, unknown>[] = [
|
||||
new ComponentDecoratorHandler(
|
||||
this.reflectionHost, this.evaluator, this.fullRegistry, this.fullMetaReader,
|
||||
this.scopeRegistry, this.dtsModuleScopeResolver, this.scopeRegistry,
|
||||
this.typeCheckScopeRegistry, new ResourceRegistry(), this.isCore,
|
||||
/* strictCtorDeps */ false, this.resourceManager, this.rootDirs,
|
||||
!!this.compilerOptions.preserveWhitespaces,
|
||||
this.typeCheckScopeRegistry, new ResourceRegistry(), this.isCore, this.resourceManager,
|
||||
this.rootDirs, !!this.compilerOptions.preserveWhitespaces,
|
||||
/* i18nUseExternalIds */ true, this.bundle.enableI18nLegacyMessageIdFormat,
|
||||
/* usePoisonedData */ false,
|
||||
/* i18nNormalizeLineEndingsInICUs */ false, this.moduleResolver, this.cycleAnalyzer,
|
||||
@@ -119,7 +117,7 @@ export class DecorationAnalyzer {
|
||||
// clang-format off
|
||||
new DirectiveDecoratorHandler(
|
||||
this.reflectionHost, this.evaluator, this.fullRegistry, this.scopeRegistry,
|
||||
this.fullMetaReader, this.injectableRegistry, this.isCore, /* strictCtorDeps */ false,
|
||||
this.fullMetaReader, this.injectableRegistry, this.isCore,
|
||||
/* semanticDepGraphUpdater */ null,
|
||||
!!this.compilerOptions.annotateForClosureCompiler,
|
||||
// In ngcc we want to compile undecorated classes with Angular features. As of
|
||||
@@ -136,7 +134,7 @@ export class DecorationAnalyzer {
|
||||
this.reflectionHost, this.evaluator, this.metaRegistry, this.scopeRegistry,
|
||||
this.injectableRegistry, this.isCore, NOOP_PERF_RECORDER),
|
||||
new InjectableDecoratorHandler(
|
||||
this.reflectionHost, this.evaluator, this.isCore,
|
||||
this.reflectionHost, this.isCore,
|
||||
/* strictCtorDeps */ false, this.injectableRegistry, NOOP_PERF_RECORDER,
|
||||
/* errorOnDuplicateProv */ false),
|
||||
new NgModuleDecoratorHandler(
|
||||
|
||||
Reference in New Issue
Block a user