@angular/compiler-cli 18.0.0-next.0 → 18.0.0-next.1

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 (50) hide show
  1. package/bundles/{chunk-SQY7XLGB.js → chunk-ALDR4XSX.js} +1107 -57
  2. package/bundles/chunk-ALDR4XSX.js.map +6 -0
  3. package/bundles/{chunk-4A7ZWBEL.js → chunk-AWB4ZG2D.js} +24 -24
  4. package/bundles/chunk-AWB4ZG2D.js.map +6 -0
  5. package/bundles/{chunk-64VF23SF.js → chunk-B454JZVO.js} +2 -2
  6. package/bundles/{chunk-NB6ZWAGP.js → chunk-C4L7A7U3.js} +16 -16
  7. package/bundles/chunk-C4L7A7U3.js.map +6 -0
  8. package/bundles/{chunk-6X7GQ6BQ.js → chunk-GGJA4IFT.js} +475 -197
  9. package/bundles/chunk-GGJA4IFT.js.map +6 -0
  10. package/bundles/{chunk-A46CQFUG.js → chunk-OHOBDHII.js} +174 -217
  11. package/bundles/chunk-OHOBDHII.js.map +6 -0
  12. package/bundles/index.js +5 -5
  13. package/bundles/linker/babel/index.js +2 -2
  14. package/bundles/linker/index.js +2 -2
  15. package/bundles/private/migrations.js +2 -2
  16. package/bundles/private/tooling.js +3 -3
  17. package/bundles/src/bin/ng_xi18n.js +4 -4
  18. package/bundles/src/bin/ngc.js +4 -4
  19. package/bundles_metadata.json +1 -1
  20. package/linker/src/file_linker/partial_linkers/util.d.ts +1 -1
  21. package/linker/src/file_linker/translator.d.ts +2 -2
  22. package/linker/src/linker_import_generator.d.ts +5 -5
  23. package/package.json +3 -3
  24. package/src/ngtsc/core/src/core_version.d.ts +11 -0
  25. package/src/ngtsc/imports/index.d.ts +1 -1
  26. package/src/ngtsc/imports/src/core.d.ts +0 -9
  27. package/src/ngtsc/imports/src/patch_alias_reference_resolution.d.ts +3 -1
  28. package/src/ngtsc/transform/index.d.ts +0 -1
  29. package/src/ngtsc/transform/src/declaration.d.ts +1 -1
  30. package/src/ngtsc/translator/index.d.ts +2 -2
  31. package/src/ngtsc/translator/src/api/import_generator.d.ts +22 -10
  32. package/src/ngtsc/translator/src/import_manager/check_unique_identifier_name.d.ts +13 -0
  33. package/src/ngtsc/translator/src/import_manager/import_manager.d.ts +94 -0
  34. package/src/ngtsc/translator/src/import_manager/import_typescript_transform.d.ts +17 -0
  35. package/src/ngtsc/translator/src/import_manager/reuse_generated_imports.d.ts +32 -0
  36. package/src/ngtsc/translator/src/import_manager/reuse_source_file_imports.d.ts +38 -0
  37. package/src/ngtsc/translator/src/translator.d.ts +3 -2
  38. package/src/ngtsc/translator/src/type_translator.d.ts +1 -1
  39. package/src/ngtsc/translator/src/typescript_translator.d.ts +2 -2
  40. package/src/ngtsc/typecheck/src/reference_emit_environment.d.ts +1 -1
  41. package/src/ngtsc/typecheck/src/ts_util.d.ts +0 -2
  42. package/src/transformers/jit_transforms/initializer_api_transforms/transform_api.d.ts +1 -1
  43. package/bundles/chunk-4A7ZWBEL.js.map +0 -6
  44. package/bundles/chunk-6X7GQ6BQ.js.map +0 -6
  45. package/bundles/chunk-A46CQFUG.js.map +0 -6
  46. package/bundles/chunk-NB6ZWAGP.js.map +0 -6
  47. package/bundles/chunk-SQY7XLGB.js.map +0 -6
  48. package/src/ngtsc/transform/src/utils.d.ts +0 -15
  49. package/src/ngtsc/translator/src/import_manager.d.ts +0 -47
  50. /package/bundles/{chunk-64VF23SF.js.map → chunk-B454JZVO.js.map} +0 -0
@@ -7,7 +7,7 @@
7
7
  */
8
8
  import { MaybeForwardRefExpression, outputAst as o, R3DeclareDependencyMetadata, R3DependencyMetadata, R3Reference } from '@angular/compiler';
9
9
  import { AstObject, AstValue } from '../../ast/ast_value';
10
- export declare const PLACEHOLDER_VERSION = "18.0.0-next.0";
10
+ export declare const PLACEHOLDER_VERSION = "18.0.0-next.1";
11
11
  export declare function wrapReference<TExpression>(wrapped: o.WrappedNodeExpr<TExpression>): R3Reference;
12
12
  /**
13
13
  * Parses the value of an enum from the AST value's symbol name.
@@ -17,9 +17,9 @@ export declare class Translator<TStatement, TExpression> {
17
17
  /**
18
18
  * Translate the given output AST in the context of an expression.
19
19
  */
20
- translateExpression(expression: o.Expression, imports: ImportGenerator<TExpression>, options?: TranslatorOptions<TExpression>): TExpression;
20
+ translateExpression(expression: o.Expression, imports: ImportGenerator<null, TExpression>, options?: TranslatorOptions<TExpression>): TExpression;
21
21
  /**
22
22
  * Translate the given output AST in the context of a statement.
23
23
  */
24
- translateStatement(statement: o.Statement, imports: ImportGenerator<TExpression>, options?: TranslatorOptions<TExpression>): TStatement;
24
+ translateStatement(statement: o.Statement, imports: ImportGenerator<null, TExpression>, options?: TranslatorOptions<TExpression>): TStatement;
25
25
  }
@@ -5,7 +5,7 @@
5
5
  * Use of this source code is governed by an MIT-style license that can be
6
6
  * found in the LICENSE file at https://angular.io/license
7
7
  */
8
- import { ImportGenerator, NamedImport } from '../../src/ngtsc/translator';
8
+ import { AstFactory, ImportGenerator, ImportRequest } from '../../src/ngtsc/translator';
9
9
  /**
10
10
  * A class that is used to generate imports when translating from Angular Output AST to an AST to
11
11
  * render, such as Babel.
@@ -14,10 +14,10 @@ import { ImportGenerator, NamedImport } from '../../src/ngtsc/translator';
14
14
  * must be achieved by property access on an `ng` namespace identifier, which is passed in via the
15
15
  * constructor.
16
16
  */
17
- export declare class LinkerImportGenerator<TExpression> implements ImportGenerator<TExpression> {
17
+ export declare class LinkerImportGenerator<TStatement, TExpression> implements ImportGenerator<null, TExpression> {
18
+ private factory;
18
19
  private ngImport;
19
- constructor(ngImport: TExpression);
20
- generateNamespaceImport(moduleName: string): TExpression;
21
- generateNamedImport(moduleName: string, originalSymbol: string): NamedImport<TExpression>;
20
+ constructor(factory: AstFactory<TStatement, TExpression>, ngImport: TExpression);
21
+ addImport(request: ImportRequest<null>): TExpression;
22
22
  private assertModuleName;
23
23
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/compiler-cli",
3
- "version": "18.0.0-next.0",
3
+ "version": "18.0.0-next.1",
4
4
  "description": "Angular - the compiler CLI for Node.js",
5
5
  "typings": "index.d.ts",
6
6
  "bin": {
@@ -43,7 +43,7 @@
43
43
  }
44
44
  },
45
45
  "dependencies": {
46
- "@babel/core": "7.23.9",
46
+ "@babel/core": "7.24.1",
47
47
  "@jridgewell/sourcemap-codec": "^1.4.14",
48
48
  "reflect-metadata": "^0.2.0",
49
49
  "chokidar": "^3.0.0",
@@ -53,7 +53,7 @@
53
53
  "yargs": "^17.2.1"
54
54
  },
55
55
  "peerDependencies": {
56
- "@angular/compiler": "18.0.0-next.0",
56
+ "@angular/compiler": "18.0.0-next.1",
57
57
  "typescript": ">=5.2 <5.5"
58
58
  },
59
59
  "repository": {
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @license
3
+ * Copyright Google LLC All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://angular.io/license
7
+ */
8
+ import { ExternalReference } from '@angular/compiler';
9
+ import ts from 'typescript';
10
+ export declare function coreHasSymbol(program: ts.Program, symbol: ExternalReference): boolean | null;
11
+ export declare function isMaybeCore(sf: ts.SourceFile): boolean;
@@ -12,7 +12,7 @@ export { DeferredSymbolTracker } from './src/deferred_symbol_tracker';
12
12
  export { AbsoluteModuleStrategy, assertSuccessfulReferenceEmit, EmittedReference, FailedEmitResult, ImportedFile, ImportFlags, LocalIdentifierStrategy, LogicalProjectStrategy, ReferenceEmitKind, ReferenceEmitResult, ReferenceEmitStrategy, ReferenceEmitter, RelativePathStrategy, UnifiedModulesStrategy } from './src/emitter';
13
13
  export { ImportedSymbolsTracker } from './src/imported_symbols_tracker';
14
14
  export { LocalCompilationExtraImportsTracker } from './src/local_compilation_extra_imports_tracker';
15
- export { isAliasImportDeclaration, loadIsReferencedAliasDeclarationPatch } from './src/patch_alias_reference_resolution';
15
+ export { AliasImportDeclaration, isAliasImportDeclaration, loadIsReferencedAliasDeclarationPatch } from './src/patch_alias_reference_resolution';
16
16
  export { Reexport } from './src/reexport';
17
17
  export { OwningModule, Reference } from './src/references';
18
18
  export { ModuleResolver } from './src/resolver';
@@ -9,13 +9,6 @@
9
9
  * Rewrites imports of symbols being written into generated code.
10
10
  */
11
11
  export interface ImportRewriter {
12
- /**
13
- * Should the given symbol be imported at all?
14
- *
15
- * If `true`, the symbol should be imported from the given specifier. If `false`, the symbol
16
- * should be referenced directly, without an import.
17
- */
18
- shouldImportSymbol(symbol: string, specifier: string): boolean;
19
12
  /**
20
13
  * Optionally rewrite a reference to an imported symbol, changing either the binding prefix or the
21
14
  * symbol name itself.
@@ -30,7 +23,6 @@ export interface ImportRewriter {
30
23
  * `ImportRewriter` that does no rewriting.
31
24
  */
32
25
  export declare class NoopImportRewriter implements ImportRewriter {
33
- shouldImportSymbol(symbol: string, specifier: string): boolean;
34
26
  rewriteSymbol(symbol: string, specifier: string): string;
35
27
  rewriteSpecifier(specifier: string, inContextOfFile: string): string;
36
28
  }
@@ -41,7 +33,6 @@ export declare class NoopImportRewriter implements ImportRewriter {
41
33
  export declare class R3SymbolsImportRewriter implements ImportRewriter {
42
34
  private r3SymbolsPath;
43
35
  constructor(r3SymbolsPath: string);
44
- shouldImportSymbol(symbol: string, specifier: string): boolean;
45
36
  rewriteSymbol(symbol: string, specifier: string): string;
46
37
  rewriteSpecifier(specifier: string, inContextOfFile: string): string;
47
38
  }
@@ -6,6 +6,8 @@
6
6
  * found in the LICENSE file at https://angular.io/license
7
7
  */
8
8
  import ts from 'typescript';
9
+ /** Possible alias import declarations */
10
+ export type AliasImportDeclaration = ts.ImportSpecifier | ts.NamespaceImport | ts.ImportClause;
9
11
  /**
10
12
  * Patches the alias declaration reference resolution for a given transformation context
11
13
  * so that TypeScript knows about the specified alias declarations being referenced.
@@ -58,4 +60,4 @@ export declare function loadIsReferencedAliasDeclarationPatch(context: ts.Transf
58
60
  * declarations can be import specifiers, namespace imports or import clauses
59
61
  * as these do not declare an actual symbol but just point to a target declaration.
60
62
  */
61
- export declare function isAliasImportDeclaration(node: ts.Node): node is ts.ImportSpecifier | ts.NamespaceImport | ts.ImportClause;
63
+ export declare function isAliasImportDeclaration(node: ts.Node): node is AliasImportDeclaration;
@@ -11,4 +11,3 @@ export { ClassRecord, TraitCompiler } from './src/compilation';
11
11
  export { declarationTransformFactory, DtsTransformRegistry, IvyDeclarationDtsTransform } from './src/declaration';
12
12
  export { AnalyzedTrait, PendingTrait, ResolvedTrait, SkippedTrait, Trait, TraitState } from './src/trait';
13
13
  export { ivyTransformFactory } from './src/transform';
14
- export { addImports } from './src/utils';
@@ -24,7 +24,7 @@ export declare class DtsTransformRegistry {
24
24
  */
25
25
  getAllTransforms(sf: ts.SourceFile): DtsTransform[] | null;
26
26
  }
27
- export declare function declarationTransformFactory(transformRegistry: DtsTransformRegistry, reflector: ReflectionHost, refEmitter: ReferenceEmitter, importRewriter: ImportRewriter, importPrefix?: string): ts.TransformerFactory<ts.SourceFile>;
27
+ export declare function declarationTransformFactory(transformRegistry: DtsTransformRegistry, reflector: ReflectionHost, refEmitter: ReferenceEmitter, importRewriter: ImportRewriter): ts.TransformerFactory<ts.SourceFile>;
28
28
  export interface IvyDeclarationField {
29
29
  name: string;
30
30
  type: Type;
@@ -6,9 +6,9 @@
6
6
  * found in the LICENSE file at https://angular.io/license
7
7
  */
8
8
  export { AstFactory, BinaryOperator, LeadingComment, ObjectLiteralProperty, SourceMapLocation, SourceMapRange, TemplateElement, TemplateLiteral, UnaryOperator, VariableDeclarationType } from './src/api/ast_factory';
9
- export { ImportGenerator, NamedImport } from './src/api/import_generator';
9
+ export { ImportGenerator, ImportRequest } from './src/api/import_generator';
10
10
  export { Context } from './src/context';
11
- export { Import, ImportManager, NamespaceImport, SideEffectImport } from './src/import_manager';
11
+ export { ImportManager, ImportManagerConfig, presetImportManagerForceNamespaceImports } from './src/import_manager/import_manager';
12
12
  export { ExpressionTranslatorVisitor, RecordWrappedNodeFn, TranslatorOptions } from './src/translator';
13
13
  export { canEmitType, TypeEmitter, TypeReferenceTranslator } from './src/type_emitter';
14
14
  export { translateType } from './src/type_translator';
@@ -6,14 +6,27 @@
6
6
  * found in the LICENSE file at https://angular.io/license
7
7
  */
8
8
  /**
9
- * The symbol name and import namespace of an imported symbol,
10
- * which has been registered through the ImportGenerator.
9
+ * A request to import a given symbol from the given module.
11
10
  */
12
- export interface NamedImport<TExpression> {
13
- /** The import namespace containing this imported symbol. */
14
- moduleImport: TExpression | null;
15
- /** The (possibly rewritten) name of the imported symbol. */
16
- symbol: string;
11
+ export interface ImportRequest<TFile> {
12
+ /**
13
+ * Name of the export to be imported.
14
+ * May be `null` if a namespace import is requested.
15
+ */
16
+ exportSymbolName: string | null;
17
+ /**
18
+ * Module specifier to be imported.
19
+ * May be a module name, or a file-relative path.
20
+ */
21
+ exportModuleSpecifier: string;
22
+ /**
23
+ * File for which the import is requested for. This may
24
+ * be used by import generators to re-use existing imports.
25
+ *
26
+ * Import managers may also allow this to be nullable if
27
+ * imports are never re-used. E.g. in the linker generator.
28
+ */
29
+ requestedFile: TFile;
17
30
  }
18
31
  /**
19
32
  * Generate import information based on the context of the code being generated.
@@ -21,7 +34,6 @@ export interface NamedImport<TExpression> {
21
34
  * Implementations of these methods return a specific identifier that corresponds to the imported
22
35
  * module.
23
36
  */
24
- export interface ImportGenerator<TExpression> {
25
- generateNamespaceImport(moduleName: string): TExpression;
26
- generateNamedImport(moduleName: string, originalSymbol: string): NamedImport<TExpression>;
37
+ export interface ImportGenerator<TFile, TExpression> {
38
+ addImport(request: ImportRequest<TFile>): TExpression;
27
39
  }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @license
3
+ * Copyright Google LLC All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://angular.io/license
7
+ */
8
+ import type { ImportManagerConfig } from './import_manager';
9
+ /**
10
+ * Generates a helper for `ImportManagerConfig` to generate unique identifiers
11
+ * for a given source file.
12
+ */
13
+ export declare function createGenerateUniqueIdentifierHelper(): ImportManagerConfig['generateUniqueIdentifier'];
@@ -0,0 +1,94 @@
1
+ /**
2
+ * @license
3
+ * Copyright Google LLC All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://angular.io/license
7
+ */
8
+ import ts from 'typescript';
9
+ import { AliasImportDeclaration, ImportRewriter } from '../../../imports';
10
+ import { ImportGenerator, ImportRequest } from '../api/import_generator';
11
+ /** Configuration for the import manager. */
12
+ export interface ImportManagerConfig {
13
+ generateUniqueIdentifier(file: ts.SourceFile, baseName: string): ts.Identifier | null;
14
+ shouldUseSingleQuotes(file: ts.SourceFile): boolean;
15
+ rewriter: ImportRewriter | null;
16
+ namespaceImportPrefix: string;
17
+ disableOriginalSourceFileReuse: boolean;
18
+ forceGenerateNamespacesForNewImports: boolean;
19
+ }
20
+ /**
21
+ * Preset configuration for forcing namespace imports.
22
+ *
23
+ * This preset is commonly used to avoid test differences to previous
24
+ * versions of the `ImportManager`.
25
+ */
26
+ export declare const presetImportManagerForceNamespaceImports: Partial<ImportManagerConfig>;
27
+ /** Branded string to identify a module name. */
28
+ export type ModuleName = string & {
29
+ __moduleName: boolean;
30
+ };
31
+ /**
32
+ * Import manager that can be used to conveniently and efficiently generate
33
+ * imports It efficiently re-uses existing source file imports, or previous
34
+ * generated imports.
35
+ *
36
+ * These capabilities are important for efficient TypeScript transforms that
37
+ * minimize structural changes to the dependency graph of source files, enabling
38
+ * as much incremental re-use as possible.
39
+ *
40
+ * Those imports may be inserted via a TypeScript transform, or via manual string
41
+ * manipulation using e.g. `magic-string`.
42
+ */
43
+ export declare class ImportManager implements ImportGenerator<ts.SourceFile, ts.Identifier | ts.PropertyAccessExpression> {
44
+ private _config;
45
+ /** List of new imports that will be inserted into given source files. */
46
+ private newImports;
47
+ private nextUniqueIndex;
48
+ private config;
49
+ private reuseSourceFileImportsTracker;
50
+ private reuseGeneratedImportsTracker;
51
+ constructor(_config?: Partial<ImportManagerConfig>);
52
+ /** Adds a side-effect import for the given module. */
53
+ addSideEffectImport(requestedFile: ts.SourceFile, moduleSpecifier: string): void;
54
+ /**
55
+ * Adds an import to the given source-file and returns a TypeScript
56
+ * expression that can be used to access the newly imported symbol.
57
+ */
58
+ addImport(request: ImportRequest<ts.SourceFile> & {
59
+ asTypeReference: true;
60
+ }): ts.Identifier | ts.QualifiedName;
61
+ addImport(request: ImportRequest<ts.SourceFile> & {
62
+ asTypeReference?: undefined;
63
+ }): ts.Identifier | ts.PropertyAccessExpression;
64
+ private _generateNewImport;
65
+ /**
66
+ * Finalizes the import manager by computing all necessary import changes
67
+ * and returning them.
68
+ *
69
+ * Changes are collected once at the end, after all imports are requested,
70
+ * because this simplifies building up changes to existing imports that need
71
+ * to be updated, and allows more trivial re-use of previous generated imports.
72
+ */
73
+ finalize(): {
74
+ affectedFiles: Set<string>;
75
+ updatedImports: Map<ts.NamedImports, ts.NamedImports>;
76
+ newImports: Map<string, ts.ImportDeclaration[]>;
77
+ reusedOriginalAliasDeclarations: Set<AliasImportDeclaration>;
78
+ };
79
+ /**
80
+ * Gets a TypeScript transform for the import manager.
81
+ *
82
+ * @param extraStatementsMap Additional set of statements to be inserted
83
+ * for given source files after their imports. E.g. top-level constants.
84
+ */
85
+ toTsTransform(extraStatementsMap?: Map<string, ts.Statement[]>): ts.TransformerFactory<ts.SourceFile>;
86
+ /**
87
+ * Transforms a single file as a shorthand, using {@link toTsTransform}.
88
+ *
89
+ * @param extraStatementsMap Additional set of statements to be inserted
90
+ * for given source files after their imports. E.g. top-level constants.
91
+ */
92
+ transformTsFile(ctx: ts.TransformationContext, file: ts.SourceFile, extraStatementsAfterImports?: ts.Statement[]): ts.SourceFile;
93
+ private _getNewImportsTrackerForFile;
94
+ }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * @license
3
+ * Copyright Google LLC All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://angular.io/license
7
+ */
8
+ import ts from 'typescript';
9
+ import type { ImportManager } from './import_manager';
10
+ /**
11
+ * Creates a TypeScript transform for the given import manager.
12
+ *
13
+ * - The transform updates existing imports with new symbols to be added.
14
+ * - The transform adds new necessary imports.
15
+ * - The transform inserts additional optional statements after imports.
16
+ */
17
+ export declare function createTsTransformForImportManager(manager: ImportManager, extraStatementsForFiles?: Map<string, ts.Statement[]>): ts.TransformerFactory<ts.SourceFile>;
@@ -0,0 +1,32 @@
1
+ /**
2
+ * @license
3
+ * Copyright Google LLC All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://angular.io/license
7
+ */
8
+ import ts from 'typescript';
9
+ import { ImportRequest } from '../api/import_generator';
10
+ import type { ModuleName } from './import_manager';
11
+ /** Branded string identifying a hashed {@link ImportRequest}. */
12
+ type ImportRequestHash = string & {
13
+ __importHash: string;
14
+ };
15
+ /** Tracker capturing re-used generated imports. */
16
+ export interface ReuseGeneratedImportsTracker {
17
+ /**
18
+ * Map of previously resolved symbol imports. Cache can be re-used to return
19
+ * the same identifier without checking the source-file again.
20
+ */
21
+ directReuseCache: Map<ImportRequestHash, ts.Identifier | [ts.Identifier, ts.Identifier]>;
22
+ /**
23
+ * Map of module names and their potential namespace import
24
+ * identifiers. Allows efficient re-using of namespace imports.
25
+ */
26
+ namespaceImportReuseCache: Map<ModuleName, ts.Identifier>;
27
+ }
28
+ /** Attempts to efficiently re-use previous generated import requests. */
29
+ export declare function attemptToReuseGeneratedImports(tracker: ReuseGeneratedImportsTracker, request: ImportRequest<ts.SourceFile>): ts.Identifier | [ts.Identifier, ts.Identifier] | null;
30
+ /** Captures the given import request and its generated reference node/path for future re-use. */
31
+ export declare function captureGeneratedImport(request: ImportRequest<ts.SourceFile>, tracker: ReuseGeneratedImportsTracker, referenceNode: ts.Identifier | [ts.Identifier, ts.Identifier]): void;
32
+ export {};
@@ -0,0 +1,38 @@
1
+ /**
2
+ * @license
3
+ * Copyright Google LLC All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://angular.io/license
7
+ */
8
+ import ts from 'typescript';
9
+ import { AliasImportDeclaration } from '../../../imports';
10
+ import { ImportRequest } from '../api/import_generator';
11
+ /**
12
+ * Tracker necessary for enabling re-use of original source file imports.
13
+ *
14
+ * The tracker holds information about original source file imports that
15
+ * need to be updated, or import declarations/specifiers that are now
16
+ * referenced due to the import manager.
17
+ */
18
+ export interface ReuseExistingSourceFileImportsTracker {
19
+ /**
20
+ * Map of import declarations that need to be updated to include the
21
+ * given symbols.
22
+ */
23
+ updatedImports: Map<ts.ImportDeclaration, {
24
+ propertyName: ts.Identifier;
25
+ fileUniqueAlias: ts.Identifier | null;
26
+ }[]>;
27
+ /**
28
+ * Set of re-used alias import declarations.
29
+ *
30
+ * These are captured so that we can tell TypeScript to not elide these source file
31
+ * imports as we introduced references to them. More details: {@link AliasImportDeclaration}.
32
+ */
33
+ reusedAliasDeclarations: Set<AliasImportDeclaration>;
34
+ /** Generates a unique identifier for a name in the given file. */
35
+ generateUniqueIdentifier(file: ts.SourceFile, symbolName: string): ts.Identifier | null;
36
+ }
37
+ /** Attempts to re-use original source file imports for the given request. */
38
+ export declare function attemptToReuseExistingSourceFileImports(tracker: ReuseExistingSourceFileImportsTracker, sourceFile: ts.SourceFile, request: ImportRequest<ts.SourceFile>): ts.Identifier | [ts.Identifier, ts.Identifier] | null;
@@ -16,13 +16,14 @@ export interface TranslatorOptions<TExpression> {
16
16
  recordWrappedNode?: RecordWrappedNodeFn<TExpression>;
17
17
  annotateForClosureCompiler?: boolean;
18
18
  }
19
- export declare class ExpressionTranslatorVisitor<TStatement, TExpression> implements o.ExpressionVisitor, o.StatementVisitor {
19
+ export declare class ExpressionTranslatorVisitor<TFile, TStatement, TExpression> implements o.ExpressionVisitor, o.StatementVisitor {
20
20
  private factory;
21
21
  private imports;
22
+ private contextFile;
22
23
  private downlevelTaggedTemplates;
23
24
  private downlevelVariableDeclarations;
24
25
  private recordWrappedNode;
25
- constructor(factory: AstFactory<TStatement, TExpression>, imports: ImportGenerator<TExpression>, options: TranslatorOptions<TExpression>);
26
+ constructor(factory: AstFactory<TStatement, TExpression>, imports: ImportGenerator<TFile, TExpression>, contextFile: TFile, options: TranslatorOptions<TExpression>);
26
27
  visitDeclareVarStmt(stmt: o.DeclareVarStmt, context: Context): TStatement;
27
28
  visitDeclareFunctionStmt(stmt: o.DeclareFunctionStmt, context: Context): TStatement;
28
29
  visitExpressionStmt(stmt: o.ExpressionStatement, context: Context): TStatement;
@@ -9,5 +9,5 @@ import * as o from '@angular/compiler';
9
9
  import ts from 'typescript';
10
10
  import { ReferenceEmitter } from '../../imports';
11
11
  import { ReflectionHost } from '../../reflection';
12
- import { ImportManager } from './import_manager';
12
+ import { ImportManager } from './import_manager/import_manager';
13
13
  export declare function translateType(type: o.Type, contextFile: ts.SourceFile, reflector: ReflectionHost, refEmitter: ReferenceEmitter, imports: ImportManager): ts.TypeNode;
@@ -9,5 +9,5 @@ import * as o from '@angular/compiler';
9
9
  import ts from 'typescript';
10
10
  import { ImportGenerator } from './api/import_generator';
11
11
  import { TranslatorOptions } from './translator';
12
- export declare function translateExpression(expression: o.Expression, imports: ImportGenerator<ts.Expression>, options?: TranslatorOptions<ts.Expression>): ts.Expression;
13
- export declare function translateStatement(statement: o.Statement, imports: ImportGenerator<ts.Expression>, options?: TranslatorOptions<ts.Expression>): ts.Statement;
12
+ export declare function translateExpression(contextFile: ts.SourceFile, expression: o.Expression, imports: ImportGenerator<ts.SourceFile, ts.Expression>, options?: TranslatorOptions<ts.Expression>): ts.Expression;
13
+ export declare function translateStatement(contextFile: ts.SourceFile, statement: o.Statement, imports: ImportGenerator<ts.SourceFile, ts.Expression>, options?: TranslatorOptions<ts.Expression>): ts.Statement;
@@ -20,7 +20,7 @@ export declare class ReferenceEmitEnvironment {
20
20
  readonly importManager: ImportManager;
21
21
  protected refEmitter: ReferenceEmitter;
22
22
  readonly reflector: ReflectionHost;
23
- protected contextFile: ts.SourceFile;
23
+ contextFile: ts.SourceFile;
24
24
  constructor(importManager: ImportManager, refEmitter: ReferenceEmitter, reflector: ReflectionHost, contextFile: ts.SourceFile);
25
25
  canReferenceType(ref: Reference, flags?: ImportFlags): boolean;
26
26
  /**
@@ -6,7 +6,6 @@
6
6
  * found in the LICENSE file at https://angular.io/license
7
7
  */
8
8
  import ts from 'typescript';
9
- import { Import } from '../../translator';
10
9
  export declare function tsCastToAny(expr: ts.Expression): ts.Expression;
11
10
  /**
12
11
  * Create an expression which instantiates an element by its HTML tagName.
@@ -49,4 +48,3 @@ export declare function isAccessExpression(node: ts.Node): node is ts.ElementAcc
49
48
  * Creates a TypeScript node representing a numeric value.
50
49
  */
51
50
  export declare function tsNumericExpression(value: number): ts.NumericLiteral | ts.PrefixUnaryExpression;
52
- export declare function getImportString(imp: Import): string;
@@ -19,6 +19,6 @@ export type PropertyTransform = (node: ts.PropertyDeclaration & {
19
19
  * import in order to make the synthetic decorator compatible with the JIT
20
20
  * decorator downlevel transform.
21
21
  */
22
- export declare function createSyntheticAngularCoreDecoratorAccess(factory: ts.NodeFactory, importManager: ImportManager, ngClassDecorator: Decorator, decoratorName: string): ts.PropertyAccessExpression;
22
+ export declare function createSyntheticAngularCoreDecoratorAccess(factory: ts.NodeFactory, importManager: ImportManager, ngClassDecorator: Decorator, sourceFile: ts.SourceFile, decoratorName: string): ts.PropertyAccessExpression;
23
23
  /** Casts the given expression as `any`. */
24
24
  export declare function castAsAny(factory: ts.NodeFactory, expr: ts.Expression): ts.Expression;
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../../../packages/compiler-cli/src/transformers/jit_transforms/downlevel_decorators_transform.ts", "../../../../../../packages/compiler-cli/src/transformers/jit_transforms/initializer_api_transforms/transform.ts", "../../../../../../packages/compiler-cli/src/transformers/jit_transforms/initializer_api_transforms/transform_api.ts", "../../../../../../packages/compiler-cli/src/transformers/jit_transforms/initializer_api_transforms/input_function.ts", "../../../../../../packages/compiler-cli/src/transformers/jit_transforms/initializer_api_transforms/model_function.ts", "../../../../../../packages/compiler-cli/src/transformers/jit_transforms/initializer_api_transforms/output_function.ts", "../../../../../../packages/compiler-cli/src/transformers/jit_transforms/initializer_api_transforms/query_functions.ts", "../../../../../../packages/compiler-cli/src/transformers/jit_transforms/index.ts", "../../../../../../packages/compiler-cli/private/tooling.ts"],
4
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAQA,OAAO,QAAQ;AASf,SAASA,oBAAmB,WAAsB,QAAe;AAC/D,SAAO,UAAW,UAAU,WAAW,QAAQ,UAAU,OAAO,SAAS;AAC3E;AAwBA,IAAM,kCAAkC;AASxC,SAAS,mCACL,WAAyB,aAA4B;AACvD,QAAM,qBAAoD,CAAA;AAC1D,QAAM,OAAO,UAAU;AACvB,UAAQ,KAAK,MAAM;IACjB,KAAK,GAAG,WAAW;AAEjB,yBAAmB,KAAK,GAAG,QAAQ,yBAAyB,QAAQ,IAAI,CAAC;AACzE;IACF,KAAK,GAAG,WAAW;AAEjB,YAAM,OAAO;AACb,yBAAmB,KAAK,GAAG,QAAQ,yBAAyB,QAAQ,KAAK,UAAU,CAAC;AACpF,UAAI,KAAK,UAAU,QAAQ;AACzB,cAAM,OAAwB,CAAA;AAC9B,mBAAW,OAAO,KAAK,WAAW;AAChC,eAAK,KAAK,GAAG;QACf;AACA,cAAM,mBACF,GAAG,QAAQ,6BAA6B,GAAG,QAAQ,gBAAgB,MAAM,IAAI,CAAC;AAClF,2BAAmB,KAAK,GAAG,QAAQ,yBAAyB,QAAQ,gBAAgB,CAAC;MACvF;AACA;IACF;AACE,kBAAY,KAAK;QACf,MAAM,UAAU,cAAa;QAC7B,OAAO,UAAU,SAAQ;QACzB,QAAQ,UAAU,OAAM,IAAK,UAAU,SAAQ;QAC/C,aACI,GAAG,GAAG,WAAW,UAAU;QAC/B,UAAU,GAAG,mBAAmB;QAChC,MAAM;OACP;AACD;EACJ;AACA,SAAO,G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