@angular/compiler-cli 15.1.0-next.1 → 15.1.0-next.2

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 (100) hide show
  1. package/bundles/{chunk-36PDXLJA.js → chunk-4ENQEGGA.js} +2 -2
  2. package/bundles/{chunk-36PDXLJA.js.map → chunk-4ENQEGGA.js.map} +0 -0
  3. package/bundles/{chunk-R3UUI3WU.js → chunk-BGOUKBDI.js} +8 -8
  4. package/bundles/chunk-BGOUKBDI.js.map +6 -0
  5. package/bundles/{chunk-DSVWG4QJ.js → chunk-IZN5U2AM.js} +10 -1
  6. package/bundles/chunk-IZN5U2AM.js.map +6 -0
  7. package/bundles/{chunk-L3Q25PX6.js → chunk-KY7HVS6H.js} +15 -9
  8. package/bundles/chunk-KY7HVS6H.js.map +6 -0
  9. package/bundles/{chunk-4F26FKLW.js → chunk-MAF2KC4N.js} +4 -4
  10. package/bundles/{chunk-4F26FKLW.js.map → chunk-MAF2KC4N.js.map} +1 -1
  11. package/bundles/{chunk-ALSLKTUB.js → chunk-OHYTYUA4.js} +2 -2
  12. package/bundles/{chunk-ALSLKTUB.js.map → chunk-OHYTYUA4.js.map} +0 -0
  13. package/bundles/{chunk-5WGGPKCE.js → chunk-ONRVYLCK.js} +32 -36
  14. package/bundles/chunk-ONRVYLCK.js.map +6 -0
  15. package/bundles/{chunk-W67X7ZYR.js → chunk-PPMCRK4H.js} +10 -9
  16. package/bundles/{chunk-W67X7ZYR.js.map → chunk-PPMCRK4H.js.map} +1 -1
  17. package/bundles/{chunk-FCAD5QMI.js → chunk-PPWXQG65.js} +14 -12
  18. package/bundles/{chunk-FCAD5QMI.js.map → chunk-PPWXQG65.js.map} +1 -1
  19. package/bundles/{chunk-TOW3O33K.js → chunk-UN4WV3U4.js} +10 -5
  20. package/bundles/chunk-UN4WV3U4.js.map +6 -0
  21. package/bundles/{chunk-JGWOWDGB.js → chunk-Y6MBLTIR.js} +3 -3
  22. package/bundles/{chunk-JGWOWDGB.js.map → chunk-Y6MBLTIR.js.map} +0 -0
  23. package/bundles/index.js +14 -14
  24. package/bundles/index.js.map +1 -1
  25. package/bundles/linker/babel/index.js +3 -3
  26. package/bundles/linker/index.js +3 -3
  27. package/bundles/ngcc/index.js +8 -8
  28. package/bundles/ngcc/main-ngcc.js +8 -8
  29. package/bundles/ngcc/src/execution/cluster/ngcc_cluster_worker.js +13 -12
  30. package/bundles/ngcc/src/execution/cluster/ngcc_cluster_worker.js.map +1 -1
  31. package/bundles/private/bazel.js +1 -1
  32. package/bundles/private/migrations.js +5 -5
  33. package/bundles/private/tooling.js +3 -3
  34. package/bundles/src/bin/ng_xi18n.js +7 -7
  35. package/bundles/src/bin/ngc.js +7 -7
  36. package/bundles_metadata.json +1 -1
  37. package/linker/babel/src/babel_core.d.ts +4 -4
  38. package/linker/babel/src/babel_declaration_scope.d.ts +1 -1
  39. package/linker/src/ast/ast_value.d.ts +11 -16
  40. package/linker/src/file_linker/get_source_file.d.ts +1 -1
  41. package/ngcc/src/analysis/module_with_providers_analyzer.d.ts +1 -1
  42. package/ngcc/src/analysis/private_declarations_analyzer.d.ts +1 -1
  43. package/ngcc/src/analysis/types.d.ts +1 -1
  44. package/ngcc/src/dependencies/dependency_resolver.d.ts +1 -1
  45. package/ngcc/src/dependencies/module_resolver.d.ts +1 -1
  46. package/ngcc/src/execution/api.d.ts +3 -3
  47. package/ngcc/src/execution/cluster/api.d.ts +2 -2
  48. package/ngcc/src/execution/tasks/api.d.ts +4 -4
  49. package/ngcc/src/execution/tasks/completion.d.ts +1 -1
  50. package/ngcc/src/host/esm2015_host.d.ts +5 -5
  51. package/ngcc/src/host/ngcc_host.d.ts +1 -1
  52. package/ngcc/src/ngcc_options.d.ts +6 -6
  53. package/ngcc/src/packages/build_marker.d.ts +1 -1
  54. package/ngcc/src/packages/entry_point.d.ts +4 -4
  55. package/ngcc/src/packages/entry_point_manifest.d.ts +2 -2
  56. package/ngcc/src/packages/transformer.d.ts +1 -1
  57. package/ngcc/src/path_mappings.d.ts +1 -1
  58. package/ngcc/src/rendering/rendering_formatter.d.ts +1 -1
  59. package/ngcc/src/utils.d.ts +2 -2
  60. package/ngcc/src/writing/package_json_updater.d.ts +3 -3
  61. package/package.json +4 -4
  62. package/src/main.d.ts +1 -1
  63. package/src/ngtsc/annotations/common/src/di.d.ts +1 -1
  64. package/src/ngtsc/annotations/common/src/factory.d.ts +1 -1
  65. package/src/ngtsc/annotations/component/src/metadata.d.ts +2 -2
  66. package/src/ngtsc/annotations/component/src/resources.d.ts +1 -1
  67. package/src/ngtsc/core/api/src/adapter.d.ts +1 -1
  68. package/src/ngtsc/core/src/compiler.d.ts +1 -1
  69. package/src/ngtsc/core/src/host.d.ts +1 -1
  70. package/src/ngtsc/file_system/src/logical.d.ts +1 -1
  71. package/src/ngtsc/file_system/src/types.d.ts +4 -4
  72. package/src/ngtsc/imports/src/emitter.d.ts +2 -2
  73. package/src/ngtsc/incremental/src/state.d.ts +1 -1
  74. package/src/ngtsc/indexer/src/api.d.ts +1 -1
  75. package/src/ngtsc/metadata/src/inheritance.d.ts +1 -1
  76. package/src/ngtsc/metadata/src/property_mapping.d.ts +2 -2
  77. package/src/ngtsc/partial_evaluator/src/interface.d.ts +1 -1
  78. package/src/ngtsc/partial_evaluator/src/interpreter.d.ts +1 -1
  79. package/src/ngtsc/partial_evaluator/src/result.d.ts +1 -1
  80. package/src/ngtsc/perf/src/clock.d.ts +1 -1
  81. package/src/ngtsc/program_driver/src/ts_create_program_driver.d.ts +1 -1
  82. package/src/ngtsc/reflection/src/host.d.ts +9 -9
  83. package/src/ngtsc/scope/src/api.d.ts +1 -1
  84. package/src/ngtsc/scope/src/typecheck.d.ts +1 -1
  85. package/src/ngtsc/transform/src/trait.d.ts +1 -1
  86. package/src/ngtsc/translator/src/api/ast_factory.d.ts +3 -3
  87. package/src/ngtsc/translator/src/translator.d.ts +1 -1
  88. package/src/ngtsc/ts_compatibility/src/ts_cross_version_utils.d.ts +50 -14
  89. package/src/ngtsc/typecheck/api/api.d.ts +3 -3
  90. package/src/ngtsc/typecheck/api/completion.d.ts +1 -1
  91. package/src/ngtsc/typecheck/api/symbols.d.ts +3 -3
  92. package/src/ngtsc/typecheck/src/type_emitter.d.ts +1 -1
  93. package/src/ngtsc/util/src/typescript.d.ts +3 -3
  94. package/src/ngtsc/util/src/visitor.d.ts +1 -1
  95. package/src/perform_compile.d.ts +1 -1
  96. package/bundles/chunk-5WGGPKCE.js.map +0 -6
  97. package/bundles/chunk-DSVWG4QJ.js.map +0 -6
  98. package/bundles/chunk-L3Q25PX6.js.map +0 -6
  99. package/bundles/chunk-R3UUI3WU.js.map +0 -6
  100. package/bundles/chunk-TOW3O33K.js.map +0 -6
@@ -98,7 +98,7 @@ export interface VariableIdentifier extends TemplateIdentifier {
98
98
  * Identifiers recorded at the top level of the template, without any context about the HTML nodes
99
99
  * they were discovered in.
100
100
  */
101
- export declare type TopLevelIdentifier = PropertyIdentifier | ElementIdentifier | TemplateNodeIdentifier | ReferenceIdentifier | VariableIdentifier | MethodIdentifier;
101
+ export type TopLevelIdentifier = PropertyIdentifier | ElementIdentifier | TemplateNodeIdentifier | ReferenceIdentifier | VariableIdentifier | MethodIdentifier;
102
102
  /**
103
103
  * Describes the absolute byte offsets of a text anchor in a source code.
104
104
  */
@@ -17,4 +17,4 @@ import { DirectiveMeta, MetadataReader } from './api';
17
17
  * fully resolved, or `baseClass: 'dynamic'` if the inheritance chain could not be completely
18
18
  * followed.
19
19
  */
20
- export declare function flattenInheritedDirectiveMetadata(reader: MetadataReader, dir: Reference<ClassDeclaration>): DirectiveMeta;
20
+ export declare function flattenInheritedDirectiveMetadata(reader: MetadataReader, dir: Reference<ClassDeclaration>): DirectiveMeta | null;
@@ -12,13 +12,13 @@ import { InputOutputPropertySet } from '@angular/compiler';
12
12
  *
13
13
  * This type exists for documentation only.
14
14
  */
15
- export declare type ClassPropertyName = string;
15
+ export type ClassPropertyName = string;
16
16
  /**
17
17
  * The name by which an input or output of a directive or component is bound in an Angular template.
18
18
  *
19
19
  * This type exists for documentation only.
20
20
  */
21
- export declare type BindingPropertyName = string;
21
+ export type BindingPropertyName = string;
22
22
  /**
23
23
  * An input or output of a directive that has both a named JavaScript class property on a component
24
24
  * or directive class, as well as an Angular template property name used for binding.
@@ -12,7 +12,7 @@ import { DependencyTracker } from '../../incremental/api';
12
12
  import { ReflectionHost } from '../../reflection';
13
13
  import { DynamicValue } from './dynamic';
14
14
  import { ResolvedValue } from './result';
15
- export declare type ForeignFunctionResolver = (fn: Reference<ts.FunctionDeclaration | ts.MethodDeclaration | ts.FunctionExpression>, callExpr: ts.CallExpression, resolve: (expr: ts.Expression) => ResolvedValue, unresolvable: DynamicValue) => ResolvedValue;
15
+ export type ForeignFunctionResolver = (fn: Reference<ts.FunctionDeclaration | ts.MethodDeclaration | ts.FunctionExpression>, callExpr: ts.CallExpression, resolve: (expr: ts.Expression) => ResolvedValue, unresolvable: DynamicValue) => ResolvedValue;
16
16
  export declare class PartialEvaluator {
17
17
  private host;
18
18
  private checker;
@@ -15,7 +15,7 @@ import { ResolvedValue } from './result';
15
15
  * Tracks the scope of a function body, which includes `ResolvedValue`s for the parameters of that
16
16
  * body.
17
17
  */
18
- declare type Scope = Map<ts.ParameterDeclaration, ResolvedValue>;
18
+ type Scope = Map<ts.ParameterDeclaration, ResolvedValue>;
19
19
  interface Context {
20
20
  originatingFile: ts.SourceFile;
21
21
  /**
@@ -18,7 +18,7 @@ import { SyntheticValue } from './synthetic';
18
18
  * non-primitive value, or a special `DynamicValue` type which indicates the value was not
19
19
  * available statically.
20
20
  */
21
- export declare type ResolvedValue = number | boolean | string | null | undefined | Reference | EnumValue | ResolvedValueArray | ResolvedValueMap | ResolvedModule | KnownFn | SyntheticValue<unknown> | DynamicValue<unknown>;
21
+ export type ResolvedValue = number | boolean | string | null | undefined | Reference | EnumValue | ResolvedValueArray | ResolvedValueMap | ResolvedModule | KnownFn | SyntheticValue<unknown> | DynamicValue<unknown>;
22
22
  /**
23
23
  * An array of `ResolvedValue`s.
24
24
  *
@@ -6,6 +6,6 @@
6
6
  * found in the LICENSE file at https://angular.io/license
7
7
  */
8
8
  /// <amd-module name="@angular/compiler-cli/src/ngtsc/perf/src/clock" />
9
- export declare type HrTime = [number, number];
9
+ export type HrTime = [number, number];
10
10
  export declare function mark(): HrTime;
11
11
  export declare function timeSinceInMicros(mark: HrTime): number;
@@ -41,7 +41,7 @@ export declare class DelegatingCompilerHost implements Omit<RequiredDelegations<
41
41
  trace: ((s: string) => void) | undefined;
42
42
  useCaseSensitiveFileNames: () => boolean;
43
43
  getModuleResolutionCache: (() => ts.ModuleResolutionCache | undefined) | undefined;
44
- hasInvalidatedResolutions: ((fileName: string, path: ts.Path, languageVersionOrOptions: ts.ScriptTarget | ts.CreateSourceFileOptions, onError?: ((message: string) => void) | undefined, shouldCreateNewSourceFile?: boolean | undefined) => ts.SourceFile | undefined) | (() => ts.CancellationToken) | ((options: ts.CompilerOptions) => string) | (() => string) | (() => string) | ((fileName: string) => string) | (() => boolean) | (() => string) | ((rootDir: string, extensions: readonly string[], excludes: readonly string[] | undefined, includes: readonly string[], depth?: number | undefined) => string[]) | ((moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, redirectedReference: ts.ResolvedProjectReference | undefined, options: ts.CompilerOptions, containingSourceFile?: ts.SourceFile | undefined) => (ts.ResolvedModule | undefined)[]) | (() => ts.ModuleResolutionCache | undefined) | ((typeReferenceDirectiveNames: string[] | readonly ts.FileReference[], containingFile: string, redirectedReference: ts.ResolvedProjectReference | undefined, options: ts.CompilerOptions, containingFileMode?: ts.ModuleKind.CommonJS | ts.ModuleKind.ESNext | undefined) => (ts.ResolvedTypeReferenceDirective | undefined)[]) | ((name: string) => string | undefined) | ((data: string) => string) | ((fileName: string) => ts.ParsedCommandLine | undefined) | ((fileName: string) => string | undefined) | ((s: string) => void) | ((directoryName: string) => boolean) | ((path: string) => string) | ((path: string) => string[]) | ((fileName: string, languageVersionOrOptions: ts.ScriptTarget | ts.CreateSourceFileOptions, onError?: ((message: string) => void) | undefined, shouldCreateNewSourceFile?: boolean | undefined) => ts.SourceFile | undefined) | ((fileName: string) => boolean) | ts.WriteFileCallback | undefined;
44
+ hasInvalidatedResolutions: ((filePath: ts.Path) => boolean) | undefined;
45
45
  }
46
46
  /**
47
47
  * Updates a `ts.Program` instance with a new one that incorporates specific changes, using the
@@ -11,7 +11,7 @@ import ts from 'typescript';
11
11
  * Metadata extracted from an instance of a decorator on another declaration, or synthesized from
12
12
  * other information about a class.
13
13
  */
14
- export declare type Decorator = ConcreteDecorator | SyntheticDecorator;
14
+ export type Decorator = ConcreteDecorator | SyntheticDecorator;
15
15
  export interface BaseDecorator {
16
16
  /**
17
17
  * Name by which the decorator was invoked in the user's code.
@@ -69,8 +69,8 @@ export declare const Decorator: {
69
69
  * A decorator is identified by either a simple identifier (e.g. `Decorator`) or, in some cases,
70
70
  * a namespaced property access (e.g. `core.Decorator`).
71
71
  */
72
- export declare type DecoratorIdentifier = ts.Identifier | NamespacedIdentifier;
73
- export declare type NamespacedIdentifier = ts.PropertyAccessExpression & {
72
+ export type DecoratorIdentifier = ts.Identifier | NamespacedIdentifier;
73
+ export type NamespacedIdentifier = ts.PropertyAccessExpression & {
74
74
  expression: ts.Identifier;
75
75
  name: ts.Identifier;
76
76
  };
@@ -90,7 +90,7 @@ export declare function isDecoratorIdentifier(exp: ts.Expression): exp is Decora
90
90
  * For `ReflectionHost` purposes, a class declaration should always have a `name` identifier,
91
91
  * because we need to be able to reference it in other parts of the program.
92
92
  */
93
- export declare type ClassDeclaration<T extends DeclarationNode = DeclarationNode> = T & {
93
+ export type ClassDeclaration<T extends DeclarationNode = DeclarationNode> = T & {
94
94
  name: ts.Identifier;
95
95
  };
96
96
  /**
@@ -307,7 +307,7 @@ export interface MissingType {
307
307
  /**
308
308
  * The various reasons why a type node may not be referred to as a value.
309
309
  */
310
- export declare type UnavailableValue = UnsupportedType | NoValueDeclaration | TypeOnlyImport | NamespaceImport | UnknownReference | MissingType;
310
+ export type UnavailableValue = UnsupportedType | NoValueDeclaration | TypeOnlyImport | NamespaceImport | UnknownReference | MissingType;
311
311
  /**
312
312
  * A reference to a value that originated from a type position.
313
313
  *
@@ -317,7 +317,7 @@ export declare type UnavailableValue = UnsupportedType | NoValueDeclaration | Ty
317
317
  *
318
318
  * See the individual types for additional information.
319
319
  */
320
- export declare type TypeValueReference = LocalTypeValueReference | ImportedTypeValueReference | UnavailableTypeValueReference;
320
+ export type TypeValueReference = LocalTypeValueReference | ImportedTypeValueReference | UnavailableTypeValueReference;
321
321
  /**
322
322
  * A parameter to a constructor.
323
323
  */
@@ -470,7 +470,7 @@ export interface EnumMember {
470
470
  * An example of this is `exports.someVar = 42` where the declaration expression would be
471
471
  * `exports.someVar`.
472
472
  */
473
- export declare type DeclarationNode = ts.Declaration | ts.Expression;
473
+ export type DeclarationNode = ts.Declaration | ts.Expression;
474
474
  /**
475
475
  * The type of a Declaration - whether its node is concrete (ts.Declaration) or inline
476
476
  * (ts.Expression). See `ConcreteDeclaration`, `InlineDeclaration` and `DeclarationNode` for more
@@ -516,7 +516,7 @@ export interface ConcreteDeclaration<T extends ts.Declaration = ts.Declaration>
516
516
  */
517
517
  identity: SpecialDeclarationIdentity | null;
518
518
  }
519
- export declare type SpecialDeclarationIdentity = DownleveledEnum;
519
+ export type SpecialDeclarationIdentity = DownleveledEnum;
520
520
  export declare const enum SpecialDeclarationKind {
521
521
  DownleveledEnum = 0
522
522
  }
@@ -544,7 +544,7 @@ export interface InlineDeclaration extends BaseDeclaration<Exclude<DeclarationNo
544
544
  * The declaration of a symbol, along with information about how it was imported into the
545
545
  * application.
546
546
  */
547
- export declare type Declaration<T extends ts.Declaration = ts.Declaration> = ConcreteDeclaration<T> | InlineDeclaration;
547
+ export type Declaration<T extends ts.Declaration = ts.Declaration> = ConcreteDeclaration<T> | InlineDeclaration;
548
548
  /**
549
549
  * Abstracts reflection operations on a TypeScript AST.
550
550
  *
@@ -63,7 +63,7 @@ export interface StandaloneScope {
63
63
  schemas: SchemaMetadata[];
64
64
  isPoisoned: boolean;
65
65
  }
66
- export declare type ComponentScope = LocalModuleScope | StandaloneScope;
66
+ export type ComponentScope = LocalModuleScope | StandaloneScope;
67
67
  /**
68
68
  * Read information about the compilation scope of components.
69
69
  */
@@ -62,5 +62,5 @@ export declare class TypeCheckScopeRegistry {
62
62
  * an empty type-check scope is returned.
63
63
  */
64
64
  getTypeCheckScope(node: ClassDeclaration): TypeCheckScope;
65
- getTypeCheckDirectiveMetadata(ref: Reference<ClassDeclaration>): DirectiveMeta;
65
+ getTypeCheckDirectiveMetadata(ref: Reference<ClassDeclaration>): DirectiveMeta | null;
66
66
  }
@@ -40,7 +40,7 @@ export declare enum TraitState {
40
40
  * This not only simplifies the implementation, but ensures traits are monomorphic objects as
41
41
  * they're all just "views" in the type system of the same object (which never changes shape).
42
42
  */
43
- export declare type Trait<D, A, S extends SemanticSymbol | null, R> = PendingTrait<D, A, S, R> | SkippedTrait<D, A, S, R> | AnalyzedTrait<D, A, S, R> | ResolvedTrait<D, A, S, R>;
43
+ export type Trait<D, A, S extends SemanticSymbol | null, R> = PendingTrait<D, A, S, R> | SkippedTrait<D, A, S, R> | AnalyzedTrait<D, A, S, R> | ResolvedTrait<D, A, S, R>;
44
44
  /**
45
45
  * The value side of `Trait` exposes a helper to create a `Trait` in a pending state (by delegating
46
46
  * to `TraitImpl`).
@@ -199,15 +199,15 @@ export interface AstFactory<TStatement, TExpression> {
199
199
  /**
200
200
  * The type of a variable declaration.
201
201
  */
202
- export declare type VariableDeclarationType = 'const' | 'let' | 'var';
202
+ export type VariableDeclarationType = 'const' | 'let' | 'var';
203
203
  /**
204
204
  * The unary operators supported by the `AstFactory`.
205
205
  */
206
- export declare type UnaryOperator = '+' | '-' | '!';
206
+ export type UnaryOperator = '+' | '-' | '!';
207
207
  /**
208
208
  * The binary operators supported by the `AstFactory`.
209
209
  */
210
- export declare type BinaryOperator = '&&' | '>' | '>=' | '&' | '/' | '==' | '===' | '<' | '<=' | '-' | '%' | '*' | '!=' | '!==' | '||' | '+' | '??';
210
+ export type BinaryOperator = '&&' | '>' | '>=' | '&' | '/' | '==' | '===' | '<' | '<=' | '-' | '%' | '*' | '!=' | '!==' | '||' | '+' | '??';
211
211
  /**
212
212
  * The original location of the start or end of a node created by the `AstFactory`.
213
213
  */
@@ -10,7 +10,7 @@ import * as o from '@angular/compiler';
10
10
  import { AstFactory } from './api/ast_factory';
11
11
  import { ImportGenerator } from './api/import_generator';
12
12
  import { Context } from './context';
13
- export declare type RecordWrappedNodeFn<TExpression> = (node: o.WrappedNodeExpr<TExpression>) => void;
13
+ export type RecordWrappedNodeFn<TExpression> = (node: o.WrappedNodeExpr<TExpression>) => void;
14
14
  export interface TranslatorOptions<TExpression> {
15
15
  downlevelTaggedTemplates?: boolean;
16
16
  downlevelVariableDeclarations?: boolean;
@@ -8,9 +8,9 @@
8
8
  /// <amd-module name="@angular/compiler-cli/src/ngtsc/ts_compatibility/src/ts_cross_version_utils" />
9
9
  import ts from 'typescript';
10
10
  /** Equivalent of `ts.ModifierLike` which is only present in TS 4.8+. */
11
- export declare type ModifierLike = ts.Modifier | ts.Decorator;
11
+ export type ModifierLike = ts.Modifier | ts.Decorator;
12
12
  /** Type of `ts.factory.updateParameterDeclaration` in TS 4.8+. */
13
- declare type Ts48UpdateParameterDeclarationFn = (node: ts.ParameterDeclaration, modifiers: readonly ModifierLike[] | undefined, dotDotDotToken: ts.DotDotDotToken | undefined, name: string | ts.BindingName, questionToken: ts.QuestionToken | undefined, type: ts.TypeNode | undefined, initializer: ts.Expression | undefined) => ts.ParameterDeclaration;
13
+ type Ts48UpdateParameterDeclarationFn = (node: ts.ParameterDeclaration, modifiers: readonly ModifierLike[] | undefined, dotDotDotToken: ts.DotDotDotToken | undefined, name: string | ts.BindingName, questionToken: ts.QuestionToken | undefined, type: ts.TypeNode | undefined, initializer: ts.Expression | undefined) => ts.ParameterDeclaration;
14
14
  /**
15
15
  * Updates a `ts.ParameterDeclaration` declaration.
16
16
  *
@@ -19,7 +19,7 @@ declare type Ts48UpdateParameterDeclarationFn = (node: ts.ParameterDeclaration,
19
19
  */
20
20
  export declare const updateParameterDeclaration: Ts48UpdateParameterDeclarationFn;
21
21
  /** Type of `ts.factory.updateImportDeclaration` in TS 4.8+. */
22
- declare type Ts48UpdateImportDeclarationFn = (node: ts.ImportDeclaration, modifiers: readonly ts.Modifier[] | undefined, importClause: ts.ImportClause | undefined, moduleSpecifier: ts.Expression, assertClause: ts.AssertClause | undefined) => ts.ImportDeclaration;
22
+ type Ts48UpdateImportDeclarationFn = (node: ts.ImportDeclaration, modifiers: readonly ts.Modifier[] | undefined, importClause: ts.ImportClause | undefined, moduleSpecifier: ts.Expression, assertClause: ts.AssertClause | undefined) => ts.ImportDeclaration;
23
23
  /**
24
24
  * Updates a `ts.ImportDeclaration` declaration.
25
25
  *
@@ -28,7 +28,7 @@ declare type Ts48UpdateImportDeclarationFn = (node: ts.ImportDeclaration, modifi
28
28
  */
29
29
  export declare const updateImportDeclaration: Ts48UpdateImportDeclarationFn;
30
30
  /** Type of `ts.factory.updateClassDeclaration` in TS 4.8+. */
31
- declare type Ts48UpdateClassDeclarationFn = (node: ts.ClassDeclaration, modifiers: readonly ModifierLike[] | undefined, name: ts.Identifier | undefined, typeParameters: readonly ts.TypeParameterDeclaration[] | undefined, heritageClauses: readonly ts.HeritageClause[] | undefined, members: readonly ts.ClassElement[]) => ts.ClassDeclaration;
31
+ type Ts48UpdateClassDeclarationFn = (node: ts.ClassDeclaration, modifiers: readonly ModifierLike[] | undefined, name: ts.Identifier | undefined, typeParameters: readonly ts.TypeParameterDeclaration[] | undefined, heritageClauses: readonly ts.HeritageClause[] | undefined, members: readonly ts.ClassElement[]) => ts.ClassDeclaration;
32
32
  /**
33
33
  * Updates a `ts.ClassDeclaration` declaration.
34
34
  *
@@ -37,7 +37,7 @@ declare type Ts48UpdateClassDeclarationFn = (node: ts.ClassDeclaration, modifier
37
37
  */
38
38
  export declare const updateClassDeclaration: Ts48UpdateClassDeclarationFn;
39
39
  /** Type of `ts.factory.createClassDeclaration` in TS 4.8+. */
40
- declare type Ts48CreateClassDeclarationFn = (modifiers: readonly ModifierLike[] | undefined, name: ts.Identifier | undefined, typeParameters: readonly ts.TypeParameterDeclaration[] | undefined, heritageClauses: readonly ts.HeritageClause[] | undefined, members: readonly ts.ClassElement[]) => ts.ClassDeclaration;
40
+ type Ts48CreateClassDeclarationFn = (modifiers: readonly ModifierLike[] | undefined, name: ts.Identifier | undefined, typeParameters: readonly ts.TypeParameterDeclaration[] | undefined, heritageClauses: readonly ts.HeritageClause[] | undefined, members: readonly ts.ClassElement[]) => ts.ClassDeclaration;
41
41
  /**
42
42
  * Creates a `ts.ClassDeclaration` declaration.
43
43
  *
@@ -46,7 +46,7 @@ declare type Ts48CreateClassDeclarationFn = (modifiers: readonly ModifierLike[]
46
46
  */
47
47
  export declare const createClassDeclaration: Ts48CreateClassDeclarationFn;
48
48
  /** Type of `ts.factory.updateMethodDeclaration` in TS 4.8+. */
49
- declare type Ts48UpdateMethodDeclarationFn = (node: ts.MethodDeclaration, modifiers: readonly ModifierLike[] | undefined, asteriskToken: ts.AsteriskToken | undefined, name: ts.PropertyName, questionToken: ts.QuestionToken | undefined, typeParameters: readonly ts.TypeParameterDeclaration[] | undefined, parameters: readonly ts.ParameterDeclaration[], type: ts.TypeNode | undefined, body: ts.Block | undefined) => ts.MethodDeclaration;
49
+ type Ts48UpdateMethodDeclarationFn = (node: ts.MethodDeclaration, modifiers: readonly ModifierLike[] | undefined, asteriskToken: ts.AsteriskToken | undefined, name: ts.PropertyName, questionToken: ts.QuestionToken | undefined, typeParameters: readonly ts.TypeParameterDeclaration[] | undefined, parameters: readonly ts.ParameterDeclaration[], type: ts.TypeNode | undefined, body: ts.Block | undefined) => ts.MethodDeclaration;
50
50
  /**
51
51
  * Updates a `ts.MethodDeclaration` declaration.
52
52
  *
@@ -55,7 +55,7 @@ declare type Ts48UpdateMethodDeclarationFn = (node: ts.MethodDeclaration, modifi
55
55
  */
56
56
  export declare const updateMethodDeclaration: Ts48UpdateMethodDeclarationFn;
57
57
  /** Type of `ts.factory.createMethodDeclaration` in TS 4.8+. */
58
- declare type Ts48CreateMethodDeclarationFn = (modifiers: readonly ModifierLike[] | undefined, asteriskToken: ts.AsteriskToken | undefined, name: ts.PropertyName, questionToken: ts.QuestionToken | undefined, typeParameters: readonly ts.TypeParameterDeclaration[] | undefined, parameters: readonly ts.ParameterDeclaration[], type: ts.TypeNode | undefined, body: ts.Block | undefined) => ts.MethodDeclaration;
58
+ type Ts48CreateMethodDeclarationFn = (modifiers: readonly ModifierLike[] | undefined, asteriskToken: ts.AsteriskToken | undefined, name: ts.PropertyName, questionToken: ts.QuestionToken | undefined, typeParameters: readonly ts.TypeParameterDeclaration[] | undefined, parameters: readonly ts.ParameterDeclaration[], type: ts.TypeNode | undefined, body: ts.Block | undefined) => ts.MethodDeclaration;
59
59
  /**
60
60
  * Creates a `ts.MethodDeclaration` declaration.
61
61
  *
@@ -64,7 +64,7 @@ declare type Ts48CreateMethodDeclarationFn = (modifiers: readonly ModifierLike[]
64
64
  */
65
65
  export declare const createMethodDeclaration: Ts48CreateMethodDeclarationFn;
66
66
  /** Type of `ts.factory.updatePropertyDeclaration` in TS 4.8+. */
67
- declare type Ts48UpdatePropertyDeclarationFn = (node: ts.PropertyDeclaration, modifiers: readonly ModifierLike[] | undefined, name: string | ts.PropertyName, questionOrExclamationToken: ts.QuestionToken | ts.ExclamationToken | undefined, type: ts.TypeNode | undefined, initializer: ts.Expression | undefined) => ts.PropertyDeclaration;
67
+ type Ts48UpdatePropertyDeclarationFn = (node: ts.PropertyDeclaration, modifiers: readonly ModifierLike[] | undefined, name: string | ts.PropertyName, questionOrExclamationToken: ts.QuestionToken | ts.ExclamationToken | undefined, type: ts.TypeNode | undefined, initializer: ts.Expression | undefined) => ts.PropertyDeclaration;
68
68
  /**
69
69
  * Updates a `ts.PropertyDeclaration` declaration.
70
70
  *
@@ -73,7 +73,7 @@ declare type Ts48UpdatePropertyDeclarationFn = (node: ts.PropertyDeclaration, mo
73
73
  */
74
74
  export declare const updatePropertyDeclaration: Ts48UpdatePropertyDeclarationFn;
75
75
  /** Type of `ts.factory.createPropertyDeclaration` in TS 4.8+. */
76
- declare type Ts48CreatePropertyDeclarationFn = (modifiers: readonly ModifierLike[] | undefined, name: string | ts.PropertyName, questionOrExclamationToken: ts.QuestionToken | ts.ExclamationToken | undefined, type: ts.TypeNode | undefined, initializer: ts.Expression | undefined) => ts.PropertyDeclaration;
76
+ type Ts48CreatePropertyDeclarationFn = (modifiers: readonly ModifierLike[] | undefined, name: string | ts.PropertyName, questionOrExclamationToken: ts.QuestionToken | ts.ExclamationToken | undefined, type: ts.TypeNode | undefined, initializer: ts.Expression | undefined) => ts.PropertyDeclaration;
77
77
  /**
78
78
  * Creates a `ts.PropertyDeclaration` declaration.
79
79
  *
@@ -82,7 +82,7 @@ declare type Ts48CreatePropertyDeclarationFn = (modifiers: readonly ModifierLike
82
82
  */
83
83
  export declare const createPropertyDeclaration: Ts48CreatePropertyDeclarationFn;
84
84
  /** Type of `ts.factory.updateGetAccessorDeclaration` in TS 4.8+. */
85
- declare type Ts48UpdateGetAccessorDeclarationFn = (node: ts.GetAccessorDeclaration, modifiers: readonly ModifierLike[] | undefined, name: ts.PropertyName, parameters: readonly ts.ParameterDeclaration[], type: ts.TypeNode | undefined, body: ts.Block | undefined) => ts.GetAccessorDeclaration;
85
+ type Ts48UpdateGetAccessorDeclarationFn = (node: ts.GetAccessorDeclaration, modifiers: readonly ModifierLike[] | undefined, name: ts.PropertyName, parameters: readonly ts.ParameterDeclaration[], type: ts.TypeNode | undefined, body: ts.Block | undefined) => ts.GetAccessorDeclaration;
86
86
  /**
87
87
  * Updates a `ts.GetAccessorDeclaration` declaration.
88
88
  *
@@ -91,7 +91,7 @@ declare type Ts48UpdateGetAccessorDeclarationFn = (node: ts.GetAccessorDeclarati
91
91
  */
92
92
  export declare const updateGetAccessorDeclaration: Ts48UpdateGetAccessorDeclarationFn;
93
93
  /** Type of `ts.factory.createGetAccessorDeclaration` in TS 4.8+. */
94
- declare type Ts48CreateGetAccessorDeclarationFn = (modifiers: readonly ModifierLike[] | undefined, name: ts.PropertyName, parameters: readonly ts.ParameterDeclaration[], type: ts.TypeNode | undefined, body: ts.Block | undefined) => ts.GetAccessorDeclaration;
94
+ type Ts48CreateGetAccessorDeclarationFn = (modifiers: readonly ModifierLike[] | undefined, name: ts.PropertyName, parameters: readonly ts.ParameterDeclaration[], type: ts.TypeNode | undefined, body: ts.Block | undefined) => ts.GetAccessorDeclaration;
95
95
  /**
96
96
  * Creates a `ts.GetAccessorDeclaration` declaration.
97
97
  *
@@ -100,7 +100,7 @@ declare type Ts48CreateGetAccessorDeclarationFn = (modifiers: readonly ModifierL
100
100
  */
101
101
  export declare const createGetAccessorDeclaration: Ts48CreateGetAccessorDeclarationFn;
102
102
  /** Type of `ts.factory.updateSetAccessorDeclaration` in TS 4.8+. */
103
- declare type Ts48UpdateSetAccessorDeclarationFn = (node: ts.SetAccessorDeclaration, modifiers: readonly ModifierLike[] | undefined, name: ts.PropertyName, parameters: readonly ts.ParameterDeclaration[], body: ts.Block | undefined) => ts.SetAccessorDeclaration;
103
+ type Ts48UpdateSetAccessorDeclarationFn = (node: ts.SetAccessorDeclaration, modifiers: readonly ModifierLike[] | undefined, name: ts.PropertyName, parameters: readonly ts.ParameterDeclaration[], body: ts.Block | undefined) => ts.SetAccessorDeclaration;
104
104
  /**
105
105
  * Updates a `ts.GetAccessorDeclaration` declaration.
106
106
  *
@@ -109,7 +109,7 @@ declare type Ts48UpdateSetAccessorDeclarationFn = (node: ts.SetAccessorDeclarati
109
109
  */
110
110
  export declare const updateSetAccessorDeclaration: Ts48UpdateSetAccessorDeclarationFn;
111
111
  /** Type of `ts.factory.createSetAccessorDeclaration` in TS 4.8+. */
112
- declare type Ts48CreateSetAccessorDeclarationFn = (modifiers: readonly ModifierLike[] | undefined, name: ts.PropertyName, parameters: readonly ts.ParameterDeclaration[], body: ts.Block | undefined) => ts.SetAccessorDeclaration;
112
+ type Ts48CreateSetAccessorDeclarationFn = (modifiers: readonly ModifierLike[] | undefined, name: ts.PropertyName, parameters: readonly ts.ParameterDeclaration[], body: ts.Block | undefined) => ts.SetAccessorDeclaration;
113
113
  /**
114
114
  * Creates a `ts.GetAccessorDeclaration` declaration.
115
115
  *
@@ -118,7 +118,7 @@ declare type Ts48CreateSetAccessorDeclarationFn = (modifiers: readonly ModifierL
118
118
  */
119
119
  export declare const createSetAccessorDeclaration: Ts48CreateSetAccessorDeclarationFn;
120
120
  /** Type of `ts.factory.updateConstructorDeclaration` in TS 4.8+. */
121
- declare type Ts48UpdateConstructorDeclarationFn = (node: ts.ConstructorDeclaration, modifiers: readonly ts.Modifier[] | undefined, parameters: readonly ts.ParameterDeclaration[], body: ts.Block | undefined) => ts.ConstructorDeclaration;
121
+ type Ts48UpdateConstructorDeclarationFn = (node: ts.ConstructorDeclaration, modifiers: readonly ts.Modifier[] | undefined, parameters: readonly ts.ParameterDeclaration[], body: ts.Block | undefined) => ts.ConstructorDeclaration;
122
122
  /**
123
123
  * Updates a `ts.ConstructorDeclaration` declaration.
124
124
  *
@@ -140,6 +140,42 @@ export declare const getDecorators: (node: ts.Node) => readonly ts.Decorator[] |
140
140
  * We should remove it once we have dropped support for the older versions.
141
141
  */
142
142
  export declare const getModifiers: (node: ts.Node) => readonly ts.Modifier[] | undefined;
143
+ /** Type of `ts.factory.CreateParameterDeclaration` in TS 4.9+. */
144
+ type Ts49CreateParameterDeclarationFn = (modifiers: readonly ModifierLike[] | undefined, dotDotDotToken: ts.DotDotDotToken | undefined, name: string | ts.BindingName, questionToken?: ts.QuestionToken | undefined, type?: ts.TypeNode | undefined, initializer?: ts.Expression) => ts.ParameterDeclaration;
145
+ /**
146
+ * Creates a `ts.ParameterDeclaration` declaration.
147
+ *
148
+ * TODO(crisbeto): this is a backwards-compatibility layer for versions of TypeScript less than 4.9.
149
+ * We should remove it once we have dropped support for the older versions.
150
+ */
151
+ export declare const createParameterDeclaration: Ts49CreateParameterDeclarationFn;
152
+ /** Type of `ts.factory.createImportDeclaration` in TS 4.9+. */
153
+ type Ts49CreateImportDeclarationFn = (modifiers: readonly ts.Modifier[] | undefined, importClause: ts.ImportClause | undefined, moduleSpecifier: ts.Expression, assertClause?: ts.AssertClause) => ts.ImportDeclaration;
154
+ /**
155
+ * Creates a `ts.ImportDeclaration` declaration.
156
+ *
157
+ * TODO(crisbeto): this is a backwards-compatibility layer for versions of TypeScript less than 4.9.
158
+ * We should remove it once we have dropped support for the older versions.
159
+ */
160
+ export declare const createImportDeclaration: Ts49CreateImportDeclarationFn;
161
+ /** Type of `ts.factory.createFunctionDeclaration` in TS 4.9+. */
162
+ type Ts49CreateFunctionDeclarationFn = (modifiers: readonly ModifierLike[] | undefined, asteriskToken: ts.AsteriskToken | undefined, name: string | ts.Identifier | undefined, typeParameters: readonly ts.TypeParameterDeclaration[] | undefined, parameters: readonly ts.ParameterDeclaration[], type: ts.TypeNode | undefined, body: ts.Block | undefined) => ts.FunctionDeclaration;
163
+ /**
164
+ * Creates a `ts.FunctionDeclaration` declaration.
165
+ *
166
+ * TODO(crisbeto): this is a backwards-compatibility layer for versions of TypeScript less than 4.9.
167
+ * We should remove it once we have dropped support for the older versions.
168
+ */
169
+ export declare const createFunctionDeclaration: Ts49CreateFunctionDeclarationFn;
170
+ /** Type of `ts.factory.createIndexSignature` in TS 4.9+. */
171
+ type Ts49CreateIndexSignatureFn = (modifiers: readonly ts.Modifier[] | undefined, parameters: readonly ts.ParameterDeclaration[], type: ts.TypeNode) => ts.IndexSignatureDeclaration;
172
+ /**
173
+ * Creates a `ts.IndexSignatureDeclaration` declaration.
174
+ *
175
+ * TODO(crisbeto): this is a backwards-compatibility layer for versions of TypeScript less than 4.9.
176
+ * We should remove it once we have dropped support for the older versions.
177
+ */
178
+ export declare const createIndexSignature: Ts49CreateIndexSignatureFn;
143
179
  /**
144
180
  * Combines an optional array of decorators with an optional array of modifiers into a single
145
181
  * `ts.ModifierLike` array. Used in version of TypeScript after 4.8 where the `decorators` and
@@ -24,7 +24,7 @@ export interface TypeCheckableDirectiveMeta extends DirectiveMeta, DirectiveType
24
24
  isStandalone: boolean;
25
25
  hostDirectives: HostDirectiveMeta[] | null;
26
26
  }
27
- export declare type TemplateId = string & {
27
+ export type TemplateId = string & {
28
28
  __brand: 'TemplateId';
29
29
  };
30
30
  /**
@@ -44,7 +44,7 @@ export interface TemplateDiagnostic extends ts.Diagnostic {
44
44
  /**
45
45
  * A `TemplateDiagnostic` with a specific error code.
46
46
  */
47
- export declare type NgTemplateDiagnostic<T extends ErrorCode> = TemplateDiagnostic & {
47
+ export type NgTemplateDiagnostic<T extends ErrorCode> = TemplateDiagnostic & {
48
48
  __ngCode: T;
49
49
  };
50
50
  /**
@@ -282,7 +282,7 @@ export interface TypeCheckingConfig {
282
282
  */
283
283
  suggestionsForSuboptimalTypeInference: boolean;
284
284
  }
285
- export declare type TemplateSourceMapping = DirectTemplateSourceMapping | IndirectTemplateSourceMapping | ExternalTemplateSourceMapping;
285
+ export type TemplateSourceMapping = DirectTemplateSourceMapping | IndirectTemplateSourceMapping | ExternalTemplateSourceMapping;
286
286
  /**
287
287
  * A mapping to an inline template in a TS file.
288
288
  *
@@ -11,7 +11,7 @@ import { TcbLocation } from './symbols';
11
11
  /**
12
12
  * An autocompletion source of any kind.
13
13
  */
14
- export declare type Completion = ReferenceCompletion | VariableCompletion;
14
+ export type Completion = ReferenceCompletion | VariableCompletion;
15
15
  /**
16
16
  * Discriminant of an autocompletion source (a `Completion`).
17
17
  */
@@ -27,11 +27,11 @@ export declare enum SymbolKind {
27
27
  /**
28
28
  * A representation of an entity in the `TemplateAst`.
29
29
  */
30
- export declare type Symbol = InputBindingSymbol | OutputBindingSymbol | ElementSymbol | ReferenceSymbol | VariableSymbol | ExpressionSymbol | DirectiveSymbol | TemplateSymbol | DomBindingSymbol | PipeSymbol;
30
+ export type Symbol = InputBindingSymbol | OutputBindingSymbol | ElementSymbol | ReferenceSymbol | VariableSymbol | ExpressionSymbol | DirectiveSymbol | TemplateSymbol | DomBindingSymbol | PipeSymbol;
31
31
  /**
32
32
  * A `Symbol` which declares a new named entity in the template scope.
33
33
  */
34
- export declare type TemplateDeclarationSymbol = ReferenceSymbol | VariableSymbol;
34
+ export type TemplateDeclarationSymbol = ReferenceSymbol | VariableSymbol;
35
35
  /**
36
36
  * Information about where a `ts.Node` can be found in the type check file. This can either be
37
37
  * a type-checking shim file, or an original source file for inline type check blocks.
@@ -222,7 +222,7 @@ interface DirectiveSymbolBase extends PotentialDirective {
222
222
  * A representation of a directive/component whose selector matches a node in a component
223
223
  * template.
224
224
  */
225
- export declare type DirectiveSymbol = (DirectiveSymbolBase & {
225
+ export type DirectiveSymbol = (DirectiveSymbolBase & {
226
226
  isHostDirective: false;
227
227
  }) | (DirectiveSymbolBase & {
228
228
  isHostDirective: true;
@@ -12,7 +12,7 @@ import ts from 'typescript';
12
12
  * origin source file into a type reference that is valid in the desired source file. If the type
13
13
  * cannot be translated to the desired source file, then null can be returned.
14
14
  */
15
- export declare type TypeReferenceTranslator = (type: ts.TypeReferenceNode) => ts.TypeReferenceNode | null;
15
+ export type TypeReferenceTranslator = (type: ts.TypeReferenceNode) => ts.TypeReferenceNode | null;
16
16
  /**
17
17
  * Determines whether the provided type can be emitted, which means that it can be safely emitted
18
18
  * into a different location.
@@ -12,7 +12,7 @@ import { DeclarationNode } from '../../reflection';
12
12
  /**
13
13
  * Type describing a symbol that is guaranteed to have a value declaration.
14
14
  */
15
- export declare type SymbolWithValueDeclaration = ts.Symbol & {
15
+ export type SymbolWithValueDeclaration = ts.Symbol & {
16
16
  valueDeclaration: ts.Declaration;
17
17
  declarations: ts.Declaration[];
18
18
  };
@@ -50,12 +50,12 @@ export declare function isAssignment(node: ts.Node): node is ts.BinaryExpression
50
50
  /**
51
51
  * Asserts that the keys `K` form a subset of the keys of `T`.
52
52
  */
53
- export declare type SubsetOfKeys<T, K extends keyof T> = K;
53
+ export type SubsetOfKeys<T, K extends keyof T> = K;
54
54
  /**
55
55
  * Represents the type `T`, with a transformation applied that turns all methods (even optional
56
56
  * ones) into required fields (which may be `undefined`, if the method was optional).
57
57
  */
58
- export declare type RequiredDelegations<T> = {
58
+ export type RequiredDelegations<T> = {
59
59
  [M in keyof Required<T>]: T[M];
60
60
  };
61
61
  /**
@@ -11,7 +11,7 @@ import ts from 'typescript';
11
11
  * Result type of visiting a node that's typically an entry in a list, which allows specifying that
12
12
  * nodes should be added before the visited node in the output.
13
13
  */
14
- export declare type VisitListEntryResult<B extends ts.Node, T extends B> = {
14
+ export type VisitListEntryResult<B extends ts.Node, T extends B> = {
15
15
  node: T;
16
16
  before?: B[];
17
17
  after?: B[];
@@ -11,7 +11,7 @@ import { AbsoluteFsPath, ReadonlyFileSystem } from '../src/ngtsc/file_system';
11
11
  import * as api from './transformers/api';
12
12
  export declare function formatDiagnostics(diags: ReadonlyArray<ts.Diagnostic>, host?: ts.FormatDiagnosticsHost): string;
13
13
  /** Used to read configuration files. */
14
- export declare type ConfigurationHost = Pick<ReadonlyFileSystem, 'readFile' | 'exists' | 'lstat' | 'resolve' | 'join' | 'dirname' | 'extname' | 'pwd'>;
14
+ export type ConfigurationHost = Pick<ReadonlyFileSystem, 'readFile' | 'exists' | 'lstat' | 'resolve' | 'join' | 'dirname' | 'extname' | 'pwd'>;
15
15
  export interface ParsedConfiguration {
16
16
  project: string;
17
17
  options: api.CompilerOptions;