@angular/compiler-cli 16.0.0-next.6 → 16.0.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/bundles/{chunk-KOHNFJR2.js → chunk-4MSEL6HO.js} +128 -277
  2. package/bundles/chunk-4MSEL6HO.js.map +6 -0
  3. package/bundles/{chunk-HROZN3TD.js → chunk-4UQC5DMJ.js} +8 -47
  4. package/bundles/chunk-4UQC5DMJ.js.map +6 -0
  5. package/bundles/{chunk-URH5LEAG.js → chunk-7PCPPTTO.js} +5 -5
  6. package/bundles/{chunk-7RPZKH3B.js → chunk-B6WD2R2T.js} +21 -21
  7. package/bundles/{chunk-2G3UVWBI.js → chunk-C4B5W2XC.js} +8 -8
  8. package/bundles/{chunk-OULZQUKT.js → chunk-EKTJ7622.js} +7 -7
  9. package/bundles/{chunk-2YPKXLLJ.js → chunk-FJTRGXZM.js} +5 -5
  10. package/bundles/{chunk-IWRMD5BL.js → chunk-GVISPKNE.js} +5 -5
  11. package/bundles/{chunk-CF2CT7RQ.js → chunk-LYJKWJUC.js} +3 -3
  12. package/bundles/{chunk-2IU4GAMV.js → chunk-SIHBKSBW.js} +31 -38
  13. package/bundles/chunk-SIHBKSBW.js.map +6 -0
  14. package/bundles/{chunk-K2U2VZ7S.js → chunk-TBUSSXUA.js} +7 -7
  15. package/bundles/{chunk-2AZVA7MW.js → chunk-YGYAPJAN.js} +112 -97
  16. package/bundles/chunk-YGYAPJAN.js.map +6 -0
  17. package/bundles/index.js +13 -13
  18. package/bundles/linker/babel/index.js +13 -13
  19. package/bundles/linker/index.js +5 -5
  20. package/bundles/private/bazel.js +1 -1
  21. package/bundles/private/localize.js +3 -3
  22. package/bundles/private/migrations.js +6 -6
  23. package/bundles/private/tooling.js +4 -4
  24. package/bundles/src/bin/ng_xi18n.js +11 -11
  25. package/bundles/src/bin/ngc.js +9 -9
  26. package/bundles_metadata.json +1 -1
  27. package/package.json +3 -3
  28. package/src/ngtsc/annotations/common/src/references_registry.d.ts +1 -3
  29. package/src/ngtsc/annotations/common/src/util.d.ts +2 -2
  30. package/src/ngtsc/annotations/component/src/handler.d.ts +3 -2
  31. package/src/ngtsc/annotations/directive/src/handler.d.ts +3 -3
  32. package/src/ngtsc/annotations/directive/src/shared.d.ts +2 -1
  33. package/src/ngtsc/partial_evaluator/src/builtin.d.ts +0 -3
  34. package/src/ngtsc/partial_evaluator/src/interpreter.d.ts +0 -2
  35. package/src/ngtsc/reflection/src/host.d.ts +13 -178
  36. package/src/ngtsc/reflection/src/typescript.d.ts +0 -3
  37. package/src/ngtsc/transform/src/compilation.d.ts +5 -6
  38. package/bundles/chunk-2AZVA7MW.js.map +0 -6
  39. package/bundles/chunk-2IU4GAMV.js.map +0 -6
  40. package/bundles/chunk-HROZN3TD.js.map +0 -6
  41. package/bundles/chunk-KOHNFJR2.js.map +0 -6
  42. package/src/ngtsc/partial_evaluator/src/known_declaration.d.ts +0 -18
  43. package/src/ngtsc/partial_evaluator/src/ts_helpers.d.ts +0 -21
  44. /package/bundles/{chunk-URH5LEAG.js.map → chunk-7PCPPTTO.js.map} +0 -0
  45. /package/bundles/{chunk-7RPZKH3B.js.map → chunk-B6WD2R2T.js.map} +0 -0
  46. /package/bundles/{chunk-2G3UVWBI.js.map → chunk-C4B5W2XC.js.map} +0 -0
  47. /package/bundles/{chunk-OULZQUKT.js.map → chunk-EKTJ7622.js.map} +0 -0
  48. /package/bundles/{chunk-2YPKXLLJ.js.map → chunk-FJTRGXZM.js.map} +0 -0
  49. /package/bundles/{chunk-IWRMD5BL.js.map → chunk-GVISPKNE.js.map} +0 -0
  50. /package/bundles/{chunk-CF2CT7RQ.js.map → chunk-LYJKWJUC.js.map} +0 -0
  51. /package/bundles/{chunk-K2U2VZ7S.js.map → chunk-TBUSSXUA.js.map} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/compiler-cli",
3
- "version": "16.0.0-next.6",
3
+ "version": "16.0.0-rc.0",
4
4
  "description": "Angular - the compiler CLI for Node.js",
5
5
  "typings": "index.d.ts",
6
6
  "bin": {
@@ -52,7 +52,7 @@
52
52
  "yargs": "^17.2.1"
53
53
  },
54
54
  "peerDependencies": {
55
- "@angular/compiler": "16.0.0-next.6",
55
+ "@angular/compiler": "16.0.0-rc.0",
56
56
  "typescript": ">=4.9.3 <5.1"
57
57
  },
58
58
  "repository": {
@@ -66,7 +66,7 @@
66
66
  ],
67
67
  "license": "MIT",
68
68
  "engines": {
69
- "node": "^16.13.0 || >=18.10.0"
69
+ "node": "^16.14.0 || >=18.10.0"
70
70
  },
71
71
  "bugs": {
72
72
  "url": "https://github.com/angular/angular/issues"
@@ -19,9 +19,7 @@ export interface ReferencesRegistry {
19
19
  add(source: DeclarationNode, ...references: Reference<DeclarationNode>[]): void;
20
20
  }
21
21
  /**
22
- * This registry does nothing, since ngtsc does not currently need
23
- * this functionality.
24
- * The ngcc tool implements a working version for its purposes.
22
+ * This registry does nothing.
25
23
  */
26
24
  export declare class NoopReferencesRegistry implements ReferencesRegistry {
27
25
  add(source: DeclarationNode, ...references: Reference<DeclarationNode>[]): void;
@@ -20,7 +20,7 @@ import { CompileResult } from '../../../transform';
20
20
  */
21
21
  export declare function valueReferenceToExpression(valueRef: LocalTypeValueReference | ImportedTypeValueReference): Expression;
22
22
  export declare function valueReferenceToExpression(valueRef: TypeValueReference): Expression | null;
23
- export declare function toR3Reference(origin: ts.Node, valueRef: Reference, typeRef: Reference, valueContext: ts.SourceFile, typeContext: ts.SourceFile, refEmitter: ReferenceEmitter): R3Reference;
23
+ export declare function toR3Reference(origin: ts.Node, ref: Reference, context: ts.SourceFile, refEmitter: ReferenceEmitter): R3Reference;
24
24
  export declare function isAngularCore(decorator: Decorator): decorator is Decorator & {
25
25
  import: Import;
26
26
  };
@@ -82,7 +82,7 @@ export declare function resolveProvidersRequiringFactory(rawProviders: ts.Expres
82
82
  * Create an R3Reference for a class.
83
83
  *
84
84
  * The `value` is the exported declaration of the class from its source file.
85
- * The `type` is an expression that would be used by ngcc in the typings (.d.ts) files.
85
+ * The `type` is an expression that would be used in the typings (.d.ts) files.
86
86
  */
87
87
  export declare function wrapTypeReference(reflector: ReflectionHost, clazz: ClassDeclaration): R3Reference;
88
88
  /** Creates a ParseSourceSpan for a TypeScript node. */
@@ -21,7 +21,7 @@ import { AnalysisOutput, CompileResult, DecoratorHandler, DetectResult, HandlerF
21
21
  import { TypeCheckContext } from '../../../typecheck/api';
22
22
  import { ExtendedTemplateChecker } from '../../../typecheck/extended/api';
23
23
  import { Xi18nContext } from '../../../xi18n';
24
- import { InjectableClassRegistry, ResourceLoader } from '../../common';
24
+ import { InjectableClassRegistry, ReferencesRegistry, ResourceLoader } from '../../common';
25
25
  import { ComponentAnalysisData, ComponentResolutionData } from './metadata';
26
26
  import { ComponentSymbol } from './symbol';
27
27
  /**
@@ -50,13 +50,14 @@ export declare class ComponentDecoratorHandler implements DecoratorHandler<Decor
50
50
  private cycleAnalyzer;
51
51
  private cycleHandlingStrategy;
52
52
  private refEmitter;
53
+ private referencesRegistry;
53
54
  private depTracker;
54
55
  private injectableRegistry;
55
56
  private semanticDepGraphUpdater;
56
57
  private annotateForClosureCompiler;
57
58
  private perf;
58
59
  private hostDirectivesResolver;
59
- constructor(reflector: ReflectionHost, evaluator: PartialEvaluator, metaRegistry: MetadataRegistry, metaReader: MetadataReader, scopeReader: ComponentScopeReader, dtsScopeReader: DtsModuleScopeResolver, scopeRegistry: LocalModuleScopeRegistry, typeCheckScopeRegistry: TypeCheckScopeRegistry, resourceRegistry: ResourceRegistry, isCore: boolean, strictCtorDeps: boolean, resourceLoader: ResourceLoader, rootDirs: ReadonlyArray<string>, defaultPreserveWhitespaces: boolean, i18nUseExternalIds: boolean, enableI18nLegacyMessageIdFormat: boolean, usePoisonedData: boolean, i18nNormalizeLineEndingsInICUs: boolean, moduleResolver: ModuleResolver, cycleAnalyzer: CycleAnalyzer, cycleHandlingStrategy: CycleHandlingStrategy, refEmitter: ReferenceEmitter, depTracker: DependencyTracker | null, injectableRegistry: InjectableClassRegistry, semanticDepGraphUpdater: SemanticDepGraphUpdater | null, annotateForClosureCompiler: boolean, perf: PerfRecorder, hostDirectivesResolver: HostDirectivesResolver);
60
+ constructor(reflector: ReflectionHost, evaluator: PartialEvaluator, metaRegistry: MetadataRegistry, metaReader: MetadataReader, scopeReader: ComponentScopeReader, dtsScopeReader: DtsModuleScopeResolver, scopeRegistry: LocalModuleScopeRegistry, typeCheckScopeRegistry: TypeCheckScopeRegistry, resourceRegistry: ResourceRegistry, isCore: boolean, strictCtorDeps: boolean, resourceLoader: ResourceLoader, rootDirs: ReadonlyArray<string>, defaultPreserveWhitespaces: boolean, i18nUseExternalIds: boolean, enableI18nLegacyMessageIdFormat: boolean, usePoisonedData: boolean, i18nNormalizeLineEndingsInICUs: boolean, moduleResolver: ModuleResolver, cycleAnalyzer: CycleAnalyzer, cycleHandlingStrategy: CycleHandlingStrategy, refEmitter: ReferenceEmitter, referencesRegistry: ReferencesRegistry, depTracker: DependencyTracker | null, injectableRegistry: InjectableClassRegistry, semanticDepGraphUpdater: SemanticDepGraphUpdater | null, annotateForClosureCompiler: boolean, perf: PerfRecorder, hostDirectivesResolver: HostDirectivesResolver);
60
61
  private literalCache;
61
62
  private elementSchemaRegistry;
62
63
  /**
@@ -15,7 +15,7 @@ import { PerfRecorder } from '../../../perf';
15
15
  import { ClassDeclaration, Decorator, ReflectionHost } from '../../../reflection';
16
16
  import { LocalModuleScopeRegistry } from '../../../scope';
17
17
  import { AnalysisOutput, CompileResult, DecoratorHandler, DetectResult, HandlerFlags, HandlerPrecedence, ResolveResult } from '../../../transform';
18
- import { InjectableClassRegistry } from '../../common';
18
+ import { InjectableClassRegistry, ReferencesRegistry } from '../../common';
19
19
  import { DirectiveSymbol } from './symbol';
20
20
  export interface DirectiveHandlerData {
21
21
  baseClass: Reference<ClassDeclaration> | 'dynamic' | null;
@@ -39,13 +39,13 @@ export declare class DirectiveDecoratorHandler implements DecoratorHandler<Decor
39
39
  private metaReader;
40
40
  private injectableRegistry;
41
41
  private refEmitter;
42
+ private referencesRegistry;
42
43
  private isCore;
43
44
  private strictCtorDeps;
44
45
  private semanticDepGraphUpdater;
45
46
  private annotateForClosureCompiler;
46
- private compileUndecoratedClassesWithAngularFeatures;
47
47
  private perf;
48
- constructor(reflector: ReflectionHost, evaluator: PartialEvaluator, metaRegistry: MetadataRegistry, scopeRegistry: LocalModuleScopeRegistry, metaReader: MetadataReader, injectableRegistry: InjectableClassRegistry, refEmitter: ReferenceEmitter, isCore: boolean, strictCtorDeps: boolean, semanticDepGraphUpdater: SemanticDepGraphUpdater | null, annotateForClosureCompiler: boolean, compileUndecoratedClassesWithAngularFeatures: boolean, perf: PerfRecorder);
48
+ constructor(reflector: ReflectionHost, evaluator: PartialEvaluator, metaRegistry: MetadataRegistry, scopeRegistry: LocalModuleScopeRegistry, metaReader: MetadataReader, injectableRegistry: InjectableClassRegistry, refEmitter: ReferenceEmitter, referencesRegistry: ReferencesRegistry, isCore: boolean, strictCtorDeps: boolean, semanticDepGraphUpdater: SemanticDepGraphUpdater | null, annotateForClosureCompiler: boolean, perf: PerfRecorder);
49
49
  readonly precedence = HandlerPrecedence.PRIMARY;
50
50
  readonly name: string;
51
51
  detect(node: ClassDeclaration, decorators: Decorator[] | null): DetectResult<Decorator | null> | undefined;
@@ -12,13 +12,14 @@ import { ClassPropertyMapping, HostDirectiveMeta, InputMapping } from '../../../
12
12
  import { PartialEvaluator } from '../../../partial_evaluator';
13
13
  import { ClassDeclaration, ClassMember, Decorator, ReflectionHost } from '../../../reflection';
14
14
  import { HandlerFlags } from '../../../transform';
15
+ import { ReferencesRegistry } from '../../common';
15
16
  /**
16
17
  * Helper function to extract metadata from a `Directive` or `Component`. `Directive`s without a
17
18
  * selector are allowed to be used for abstract base classes. These abstract directives should not
18
19
  * appear in the declarations of an `NgModule` and additional verification is done when processing
19
20
  * the module.
20
21
  */
21
- export declare function extractDirectiveMetadata(clazz: ClassDeclaration, decorator: Readonly<Decorator | null>, reflector: ReflectionHost, evaluator: PartialEvaluator, refEmitter: ReferenceEmitter, isCore: boolean, flags: HandlerFlags, annotateForClosureCompiler: boolean, defaultSelector?: string | null): {
22
+ export declare function extractDirectiveMetadata(clazz: ClassDeclaration, decorator: Readonly<Decorator | null>, reflector: ReflectionHost, evaluator: PartialEvaluator, refEmitter: ReferenceEmitter, referencesRegistry: ReferencesRegistry, isCore: boolean, flags: HandlerFlags, annotateForClosureCompiler: boolean, defaultSelector?: string | null): {
22
23
  decorator: Map<string, ts.Expression>;
23
24
  metadata: R3DirectiveMetadata;
24
25
  inputs: ClassPropertyMapping<InputMapping>;
@@ -22,6 +22,3 @@ export declare class StringConcatBuiltinFn extends KnownFn {
22
22
  constructor(lhs: string);
23
23
  evaluate(node: ts.CallExpression, args: ResolvedValueArray): ResolvedValue;
24
24
  }
25
- export declare class ObjectAssignBuiltinFn extends KnownFn {
26
- evaluate(node: ts.CallExpression, args: ResolvedValueArray): ResolvedValue;
27
- }
@@ -46,7 +46,6 @@ export declare class StaticInterpreter {
46
46
  private visitElementAccessExpression;
47
47
  private visitPropertyAccessExpression;
48
48
  private visitSourceFile;
49
- private visitAmbiguousDeclaration;
50
49
  private accessHelper;
51
50
  private visitCallExpression;
52
51
  /**
@@ -65,7 +64,6 @@ export declare class StaticInterpreter {
65
64
  private visitSpreadElement;
66
65
  private visitBindingElement;
67
66
  private stringNameFromPropertyName;
68
- private getResolvedEnum;
69
67
  private getReference;
70
68
  private visitType;
71
69
  private visitTupleType;
@@ -7,11 +7,9 @@
7
7
  */
8
8
  import ts from 'typescript';
9
9
  /**
10
- * Metadata extracted from an instance of a decorator on another declaration, or synthesized from
11
- * other information about a class.
10
+ * Metadata extracted from an instance of a decorator on another declaration.
12
11
  */
13
- export type Decorator = ConcreteDecorator | SyntheticDecorator;
14
- export interface BaseDecorator {
12
+ export interface Decorator {
15
13
  /**
16
14
  * Name by which the decorator was invoked in the user's code.
17
15
  *
@@ -22,48 +20,25 @@ export interface BaseDecorator {
22
20
  /**
23
21
  * Identifier which refers to the decorator in the user's code.
24
22
  */
25
- identifier: DecoratorIdentifier | null;
23
+ identifier: DecoratorIdentifier;
26
24
  /**
27
25
  * `Import` by which the decorator was brought into the module in which it was invoked, or `null`
28
26
  * if the decorator was declared in the same module and not imported.
27
+ *
28
+ * Note: this field is declared using computed property syntax to work around a clang-format bug
29
+ * that resulted in inconsistent indentation of this comment block.
29
30
  */
30
- import: Import | null;
31
+ ['import']: Import | null;
31
32
  /**
32
- * TypeScript reference to the decorator itself, or `null` if the decorator is synthesized (e.g.
33
- * in ngcc).
33
+ * TypeScript reference to the decorator itself.
34
34
  */
35
- node: ts.Node | null;
35
+ node: ts.Node;
36
36
  /**
37
37
  * Arguments of the invocation of the decorator, if the decorator is invoked, or `null`
38
38
  * otherwise.
39
39
  */
40
40
  args: ts.Expression[] | null;
41
41
  }
42
- /**
43
- * Metadata extracted from an instance of a decorator on another declaration, which was actually
44
- * present in a file.
45
- *
46
- * Concrete decorators always have an `identifier` and a `node`.
47
- */
48
- export interface ConcreteDecorator extends BaseDecorator {
49
- identifier: DecoratorIdentifier;
50
- node: ts.Node;
51
- }
52
- /**
53
- * Synthetic decorators never have an `identifier` or a `node`, but know the node for which they
54
- * were synthesized.
55
- */
56
- export interface SyntheticDecorator extends BaseDecorator {
57
- identifier: null;
58
- node: null;
59
- /**
60
- * The `ts.Node` for which this decorator was created.
61
- */
62
- synthesizedFor: ts.Node;
63
- }
64
- export declare const Decorator: {
65
- nodeForError: (decorator: Decorator) => ts.Node;
66
- };
67
42
  /**
68
43
  * A decorator is identified by either a simple identifier (e.g. `Decorator`) or, in some cases,
69
44
  * a namespaced property access (e.g. `core.Decorator`).
@@ -382,35 +357,6 @@ export interface FunctionDefinition {
382
357
  */
383
358
  parameters: Parameter[];
384
359
  }
385
- /**
386
- * Possible declarations of known values, such as built-in objects/functions or TypeScript helpers.
387
- */
388
- export declare enum KnownDeclaration {
389
- /**
390
- * Indicates the JavaScript global `Object` class.
391
- */
392
- JsGlobalObject = 0,
393
- /**
394
- * Indicates the `__assign` TypeScript helper function.
395
- */
396
- TsHelperAssign = 1,
397
- /**
398
- * Indicates the `__spread` TypeScript helper function.
399
- */
400
- TsHelperSpread = 2,
401
- /**
402
- * Indicates the `__spreadArrays` TypeScript helper function.
403
- */
404
- TsHelperSpreadArrays = 3,
405
- /**
406
- * Indicates the `__spreadArray` TypeScript helper function.
407
- */
408
- TsHelperSpreadArray = 4,
409
- /**
410
- * Indicates the `__read` TypeScript helper function.
411
- */
412
- TsHelperRead = 5
413
- }
414
360
  /**
415
361
  * A parameter to a function or method.
416
362
  */
@@ -444,49 +390,15 @@ export interface Import {
444
390
  */
445
391
  from: string;
446
392
  }
447
- /**
448
- * A single enum member extracted from JavaScript when no `ts.EnumDeclaration` is available.
449
- */
450
- export interface EnumMember {
451
- /**
452
- * The name of the enum member.
453
- */
454
- name: ts.PropertyName;
455
- /**
456
- * The initializer expression of the enum member. Unlike in TypeScript, this is always available
457
- * in emitted JavaScript.
458
- */
459
- initializer: ts.Expression;
460
- }
461
393
  /**
462
394
  * A type that is used to identify a declaration.
463
- *
464
- * Declarations are normally `ts.Declaration` types such as variable declarations, class
465
- * declarations, function declarations etc.
466
- * But in some cases there is no `ts.Declaration` that can be used for a declaration, such
467
- * as when they are declared inline as part of an exported expression. Then we must use a
468
- * `ts.Expression` as the declaration.
469
- * An example of this is `exports.someVar = 42` where the declaration expression would be
470
- * `exports.someVar`.
471
395
  */
472
- export type DeclarationNode = ts.Declaration | ts.Expression;
396
+ export type DeclarationNode = ts.Declaration;
473
397
  /**
474
- * The type of a Declaration - whether its node is concrete (ts.Declaration) or inline
475
- * (ts.Expression). See `ConcreteDeclaration`, `InlineDeclaration` and `DeclarationNode` for more
476
- * information about this.
477
- */
478
- export declare const enum DeclarationKind {
479
- Concrete = 0,
480
- Inline = 1
481
- }
482
- /**
483
- * Base type for all `Declaration`s.
398
+ * The declaration of a symbol, along with information about how it was imported into the
399
+ * application.
484
400
  */
485
- export interface BaseDeclaration<T extends DeclarationNode> {
486
- /**
487
- * The type of the underlying `node`.
488
- */
489
- kind: DeclarationKind;
401
+ export interface Declaration<T extends ts.Declaration = ts.Declaration> {
490
402
  /**
491
403
  * The absolute module path from which the symbol was imported into the application, if the symbol
492
404
  * was imported via an absolute module (even through a chain of re-exports). If the symbol is part
@@ -497,53 +409,7 @@ export interface BaseDeclaration<T extends DeclarationNode> {
497
409
  * TypeScript reference to the declaration itself, if one exists.
498
410
  */
499
411
  node: T;
500
- /**
501
- * If set, describes the type of the known declaration this declaration resolves to.
502
- */
503
- known: KnownDeclaration | null;
504
- }
505
- /**
506
- * Returns true if the `decl` is a `ConcreteDeclaration` (ie. that its `node` property is a
507
- * `ts.Declaration`).
508
- */
509
- export declare function isConcreteDeclaration(decl: Declaration): decl is ConcreteDeclaration;
510
- export interface ConcreteDeclaration<T extends ts.Declaration = ts.Declaration> extends BaseDeclaration<T> {
511
- kind: DeclarationKind.Concrete;
512
- /**
513
- * Optionally represents a special identity of the declaration, or `null` if the declaration
514
- * does not have a special identity.
515
- */
516
- identity: SpecialDeclarationIdentity | null;
517
- }
518
- export type SpecialDeclarationIdentity = DownleveledEnum;
519
- export declare const enum SpecialDeclarationKind {
520
- DownleveledEnum = 0
521
- }
522
- /**
523
- * A special declaration identity that represents an enum. This is used in downleveled forms where
524
- * a `ts.EnumDeclaration` is emitted in an alternative form, e.g. an IIFE call that declares all
525
- * members.
526
- */
527
- export interface DownleveledEnum {
528
- kind: SpecialDeclarationKind.DownleveledEnum;
529
- enumMembers: EnumMember[];
530
412
  }
531
- /**
532
- * A declaration that does not have an associated TypeScript `ts.Declaration`.
533
- *
534
- * This can occur in some downlevelings when an `export const VAR = ...;` (a `ts.Declaration`) is
535
- * transpiled to an assignment statement (e.g. `exports.VAR = ...;`). There is no `ts.Declaration`
536
- * associated with `VAR` in that case, only an expression.
537
- */
538
- export interface InlineDeclaration extends BaseDeclaration<Exclude<DeclarationNode, ts.Declaration>> {
539
- kind: DeclarationKind.Inline;
540
- implementation?: DeclarationNode;
541
- }
542
- /**
543
- * The declaration of a symbol, along with information about how it was imported into the
544
- * application.
545
- */
546
- export type Declaration<T extends ts.Declaration = ts.Declaration> = ConcreteDeclaration<T> | InlineDeclaration;
547
413
  /**
548
414
  * Abstracts reflection operations on a TypeScript AST.
549
415
  *
@@ -710,37 +576,6 @@ export interface ReflectionHost {
710
576
  * if the value cannot be computed.
711
577
  */
712
578
  getVariableValue(declaration: ts.VariableDeclaration): ts.Expression | null;
713
- /**
714
- * Take an exported declaration (maybe a class down-leveled to a variable) and look up the
715
- * declaration of its type in a separate .d.ts tree.
716
- *
717
- * This function is allowed to return `null` if the current compilation unit does not have a
718
- * separate .d.ts tree. When compiling TypeScript code this is always the case, since .d.ts files
719
- * are produced only during the emit of such a compilation. When compiling .js code, however,
720
- * there is frequently a parallel .d.ts tree which this method exposes.
721
- *
722
- * Note that the `ts.Declaration` returned from this function may not be from the same
723
- * `ts.Program` as the input declaration.
724
- */
725
- getDtsDeclaration(declaration: DeclarationNode): ts.Declaration | null;
726
- /**
727
- * Get a `ts.Identifier` for a given `ClassDeclaration` which can be used to refer to the class
728
- * within its definition (such as in static fields).
729
- *
730
- * This can differ from `clazz.name` when ngcc runs over ES5 code, since the class may have a
731
- * different name within its IIFE wrapper than it does externally.
732
- */
733
- getInternalNameOfClass(clazz: ClassDeclaration): ts.Identifier;
734
- /**
735
- * Get a `ts.Identifier` for a given `ClassDeclaration` which can be used to refer to the class
736
- * from statements that are "adjacent", and conceptually tightly bound, to the class but not
737
- * actually inside it.
738
- *
739
- * Similar to `getInternalNameOfClass()`, this name can differ from `clazz.name` when ngcc runs
740
- * over ES5 code, since these "adjacent" statements need to exist in the IIFE where the class may
741
- * have a different name than it does externally.
742
- */
743
- getAdjacentNameOfClass(clazz: ClassDeclaration): ts.Identifier;
744
579
  /**
745
580
  * Returns `true` if a declaration is exported from the module in which it's defined.
746
581
  *
@@ -25,9 +25,6 @@ export declare class TypeScriptReflectionHost implements ReflectionHost {
25
25
  getDefinitionOfFunction(node: ts.Node): FunctionDefinition | null;
26
26
  getGenericArityOfClass(clazz: ClassDeclaration): number | null;
27
27
  getVariableValue(declaration: ts.VariableDeclaration): ts.Expression | null;
28
- getDtsDeclaration(_: ClassDeclaration): ts.Declaration | null;
29
- getInternalNameOfClass(clazz: ClassDeclaration): ts.Identifier;
30
- getAdjacentNameOfClass(clazz: ClassDeclaration): ts.Identifier;
31
28
  isStaticallyExported(decl: ts.Node): boolean;
32
29
  protected getDirectImportOfIdentifier(id: ts.Identifier): Import | null;
33
30
  /**
@@ -16,7 +16,7 @@ import { ClassDeclaration, DeclarationNode, Decorator, ReflectionHost } from '..
16
16
  import { ProgramTypeCheckAdapter, TypeCheckContext } from '../../typecheck/api';
17
17
  import { ExtendedTemplateChecker } from '../../typecheck/extended/api';
18
18
  import { Xi18nContext } from '../../xi18n';
19
- import { CompilationMode, CompileResult, DecoratorHandler, HandlerFlags } from './api';
19
+ import { CompilationMode, CompileResult, DecoratorHandler } from './api';
20
20
  import { DtsTransformRegistry } from './declaration';
21
21
  import { PendingTrait, Trait } from './trait';
22
22
  /**
@@ -75,12 +75,12 @@ export declare class TraitCompiler implements ProgramTypeCheckAdapter {
75
75
  * Maps source files to any class declaration(s) within them which have been discovered to contain
76
76
  * Ivy traits.
77
77
  */
78
- protected fileToClasses: Map<ts.SourceFile, Set<ClassDeclaration>>;
78
+ private fileToClasses;
79
79
  /**
80
80
  * Tracks which source files have been analyzed but did not contain any traits. This set allows
81
81
  * the compiler to skip analyzing these files in an incremental rebuild.
82
82
  */
83
- protected filesWithoutTraits: Set<ts.SourceFile>;
83
+ private filesWithoutTraits;
84
84
  private reexportMap;
85
85
  private handlersByName;
86
86
  constructor(handlers: DecoratorHandler<unknown, unknown, SemanticSymbol | null, unknown>[], reflector: ReflectionHost, perf: PerfRecorder, incrementalBuild: IncrementalBuild<ClassRecord, unknown>, compileNonExportedClasses: boolean, compilationMode: CompilationMode, dtsTransforms: DtsTransformRegistry, semanticDepGraphUpdater: SemanticDepGraphUpdater | null, sourceFileTypeIdentifier: SourceFileTypeIdentifier);
@@ -88,7 +88,6 @@ export declare class TraitCompiler implements ProgramTypeCheckAdapter {
88
88
  analyzeAsync(sf: ts.SourceFile): Promise<void> | undefined;
89
89
  private analyze;
90
90
  recordFor(clazz: ClassDeclaration): ClassRecord | null;
91
- recordsFor(sf: ts.SourceFile): ClassRecord[] | null;
92
91
  getAnalyzedRecords(): Map<ts.SourceFile, ClassRecord[]>;
93
92
  /**
94
93
  * Import a `ClassRecord` from a previous compilation.
@@ -102,8 +101,8 @@ export declare class TraitCompiler implements ProgramTypeCheckAdapter {
102
101
  private scanClassForTraits;
103
102
  protected detectTraits(clazz: ClassDeclaration, decorators: Decorator[] | null): PendingTrait<unknown, unknown, SemanticSymbol | null, unknown>[] | null;
104
103
  private makeSymbolForTrait;
105
- protected analyzeClass(clazz: ClassDeclaration, preanalyzeQueue: Promise<void>[] | null): void;
106
- protected analyzeTrait(clazz: ClassDeclaration, trait: Trait<unknown, unknown, SemanticSymbol | null, unknown>, flags?: HandlerFlags): void;
104
+ private analyzeClass;
105
+ private analyzeTrait;
107
106
  resolve(): void;
108
107
  /**
109
108
  * Generate type-checking code into the `TypeCheckContext` for any components within the given