@angular/compiler-cli 13.1.0-next.1 → 13.2.0-next.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 (106) hide show
  1. package/bundles/{chunk-JNWO3JB2.js → chunk-5NGMSHHH.js} +31 -31
  2. package/bundles/{chunk-JNWO3JB2.js.map → chunk-5NGMSHHH.js.map} +1 -1
  3. package/bundles/{chunk-S3QIIFH7.js → chunk-5QEO6HSG.js} +11 -8
  4. package/bundles/chunk-5QEO6HSG.js.map +6 -0
  5. package/bundles/{chunk-QDWL7SZJ.js → chunk-BPCUCINV.js} +2 -2
  6. package/bundles/{chunk-QDWL7SZJ.js.map → chunk-BPCUCINV.js.map} +0 -0
  7. package/bundles/{chunk-2DL256T3.js → chunk-BXWQHEIB.js} +459 -465
  8. package/bundles/chunk-BXWQHEIB.js.map +6 -0
  9. package/bundles/{chunk-WYO7JO2T.js → chunk-C2DR5MYL.js} +24 -20
  10. package/bundles/chunk-C2DR5MYL.js.map +6 -0
  11. package/bundles/{chunk-MIQ5UCHZ.js → chunk-FUXNWM54.js} +80 -59
  12. package/bundles/chunk-FUXNWM54.js.map +6 -0
  13. package/bundles/{chunk-VKIZ4TCJ.js → chunk-GX2C4BSM.js} +6218 -10769
  14. package/bundles/chunk-GX2C4BSM.js.map +6 -0
  15. package/bundles/{chunk-PBA67OV4.js → chunk-GZLU7SCP.js} +31 -7
  16. package/bundles/chunk-GZLU7SCP.js.map +6 -0
  17. package/bundles/{chunk-GLCRIILX.js → chunk-J6CW3T62.js} +5 -5
  18. package/bundles/{chunk-GLCRIILX.js.map → chunk-J6CW3T62.js.map} +0 -0
  19. package/bundles/{chunk-SKBLJA43.js → chunk-JTYUTYS2.js} +3 -3
  20. package/bundles/{chunk-SKBLJA43.js.map → chunk-JTYUTYS2.js.map} +0 -0
  21. package/bundles/{chunk-BUHTODFL.js → chunk-P2Q3CTKO.js} +13 -7
  22. package/bundles/chunk-P2Q3CTKO.js.map +6 -0
  23. package/bundles/{chunk-QL6ZC3U3.js → chunk-PF3ZPGF5.js} +7 -7
  24. package/bundles/{chunk-QL6ZC3U3.js.map → chunk-PF3ZPGF5.js.map} +0 -0
  25. package/bundles/{chunk-UMUIU7TE.js → chunk-QFB4WK55.js} +4 -4
  26. package/bundles/{chunk-UMUIU7TE.js.map → chunk-QFB4WK55.js.map} +0 -0
  27. package/bundles/{chunk-EP5JHXG2.js → chunk-TI3THPMZ.js} +7 -7
  28. package/bundles/{chunk-EP5JHXG2.js.map → chunk-TI3THPMZ.js.map} +0 -0
  29. package/bundles/{chunk-WOC6KEUY.js → chunk-UAY4RXGC.js} +43 -43
  30. package/bundles/{chunk-WOC6KEUY.js.map → chunk-UAY4RXGC.js.map} +1 -1
  31. package/bundles/index.js +12 -76
  32. package/bundles/index.js.map +2 -2
  33. package/bundles/linker/babel/index.js +12 -12
  34. package/bundles/linker/index.js +4 -4
  35. package/bundles/ngcc/index.js +12 -13
  36. package/bundles/ngcc/index.js.map +1 -1
  37. package/bundles/ngcc/main-ngcc.js +13 -14
  38. package/bundles/ngcc/main-ngcc.js.map +1 -1
  39. package/bundles/ngcc/src/execution/cluster/ngcc_cluster_worker.js +13 -14
  40. package/bundles/ngcc/src/execution/cluster/ngcc_cluster_worker.js.map +1 -1
  41. package/bundles/ngcc/src/locking/lock_file_with_child_process/ngcc_lock_unlocker.js +4 -4
  42. package/bundles/private/bazel.js +1 -1
  43. package/bundles/private/localize.js +3 -3
  44. package/bundles/private/migrations.js +5 -5
  45. package/bundles/private/tooling.js +2 -3
  46. package/bundles/src/bin/ng_xi18n.js +10 -11
  47. package/bundles/src/bin/ng_xi18n.js.map +1 -1
  48. package/bundles/src/bin/ngc.js +8 -9
  49. package/bundles/src/bin/ngc.js.map +1 -1
  50. package/bundles_metadata.json +1 -1
  51. package/index.d.ts +0 -3
  52. package/ngcc/src/host/delegating_host.d.ts +1 -2
  53. package/ngcc/src/host/esm2015_host.d.ts +1 -8
  54. package/ngcc/src/host/ngcc_host.d.ts +0 -13
  55. package/ngcc/src/host/umd_host.d.ts +3 -0
  56. package/ngcc/src/packages/build_marker.d.ts +1 -1
  57. package/ngcc/src/packages/transformer.d.ts +0 -2
  58. package/ngcc/src/rendering/esm_rendering_formatter.d.ts +1 -5
  59. package/ngcc/src/rendering/renderer.d.ts +2 -3
  60. package/ngcc/src/rendering/rendering_formatter.d.ts +0 -2
  61. package/ngcc/src/utils.d.ts +0 -7
  62. package/package.json +3 -3
  63. package/src/main.d.ts +3 -3
  64. package/src/ngtsc/core/src/host.d.ts +2 -1
  65. package/src/ngtsc/partial_evaluator/src/builtin.d.ts +5 -0
  66. package/src/ngtsc/program.d.ts +3 -6
  67. package/src/ngtsc/program_driver/src/ts_create_program_driver.d.ts +2 -1
  68. package/src/ngtsc/reflection/src/host.d.ts +1 -1
  69. package/src/ngtsc/util/src/typescript.d.ts +10 -0
  70. package/src/perform_compile.d.ts +5 -10
  71. package/src/perform_watch.d.ts +4 -4
  72. package/src/transformers/api.d.ts +3 -30
  73. package/src/transformers/compiler_host.d.ts +1 -97
  74. package/src/transformers/program.d.ts +0 -19
  75. package/src/transformers/util.d.ts +1 -20
  76. package/src/{diagnostics/typescript_version.d.ts → version_helpers.d.ts} +1 -1
  77. package/bundles/chunk-2DL256T3.js.map +0 -6
  78. package/bundles/chunk-ACINBTQB.js +0 -43
  79. package/bundles/chunk-ACINBTQB.js.map +0 -6
  80. package/bundles/chunk-BUHTODFL.js.map +0 -6
  81. package/bundles/chunk-MIQ5UCHZ.js.map +0 -6
  82. package/bundles/chunk-PBA67OV4.js.map +0 -6
  83. package/bundles/chunk-S3QIIFH7.js.map +0 -6
  84. package/bundles/chunk-VKIZ4TCJ.js.map +0 -6
  85. package/bundles/chunk-WYO7JO2T.js.map +0 -6
  86. package/ngcc/src/analysis/switch_marker_analyzer.d.ts +0 -35
  87. package/src/diagnostics/translate_diagnostics.d.ts +0 -18
  88. package/src/language_services.d.ts +0 -11
  89. package/src/metadata/bundle_index_host.d.ts +0 -16
  90. package/src/metadata/bundler.d.ts +0 -66
  91. package/src/metadata/collector.d.ts +0 -44
  92. package/src/metadata/evaluator.d.ts +0 -58
  93. package/src/metadata/index.d.ts +0 -11
  94. package/src/metadata/index_writer.d.ts +0 -10
  95. package/src/metadata/schema.d.ts +0 -182
  96. package/src/metadata/symbols.d.ts +0 -22
  97. package/src/ngtsc/switch/index.d.ts +0 -9
  98. package/src/ngtsc/switch/src/switch.d.ts +0 -10
  99. package/src/transformers/inline_resources.d.ts +0 -26
  100. package/src/transformers/lower_expressions.d.ts +0 -30
  101. package/src/transformers/metadata_cache.d.ts +0 -27
  102. package/src/transformers/metadata_reader.d.ts +0 -19
  103. package/src/transformers/node_emitter.d.ts +0 -105
  104. package/src/transformers/node_emitter_transform.d.ts +0 -19
  105. package/src/transformers/r3_metadata_transform.d.ts +0 -16
  106. package/src/transformers/r3_transform.d.ts +0 -16
package/index.d.ts CHANGED
@@ -1,12 +1,9 @@
1
1
  /// <amd-module name="@angular/compiler-cli" />
2
- export { AotCompilerHost, AotCompilerHost as StaticReflectorHost, StaticReflector, StaticSymbol } from '@angular/compiler';
3
2
  export { VERSION } from './src/version';
4
- export * from './src/metadata';
5
3
  export * from './src/transformers/api';
6
4
  export * from './src/transformers/entry_points';
7
5
  export * from './src/perform_compile';
8
6
  export { CompilerOptions as AngularCompilerOptions } from './src/transformers/api';
9
- export { ngToTsDiagnostic } from './src/transformers/util';
10
7
  export * from './private/tooling';
11
8
  export * from './src/ngtsc/logging';
12
9
  export * from './src/ngtsc/file_system';
@@ -8,7 +8,7 @@
8
8
  /// <amd-module name="@angular/compiler-cli/ngcc/src/host/delegating_host" />
9
9
  import ts from 'typescript';
10
10
  import { ClassDeclaration, ClassMember, CtorParameter, Declaration, DeclarationNode, Decorator, FunctionDefinition, Import, ReflectionHost } from '../../../src/ngtsc/reflection';
11
- import { NgccClassSymbol, NgccReflectionHost, SwitchableVariableDeclaration } from './ngcc_host';
11
+ import { NgccClassSymbol, NgccReflectionHost } from './ngcc_host';
12
12
  /**
13
13
  * A reflection host implementation that delegates reflector queries depending on whether they
14
14
  * reflect on declaration files (for dependent libraries) or source files within the entry-point
@@ -38,7 +38,6 @@ export declare class DelegatingReflectionHost implements NgccReflectionHost {
38
38
  findClassSymbols(sourceFile: ts.SourceFile): NgccClassSymbol[];
39
39
  getClassSymbol(node: ts.Node): NgccClassSymbol | undefined;
40
40
  getDecoratorsOfSymbol(symbol: NgccClassSymbol): Decorator[] | null;
41
- getSwitchableDeclarations(module: ts.Node): SwitchableVariableDeclaration[];
42
41
  getEndOfClass(classSymbol: NgccClassSymbol): ts.Node;
43
42
  detectKnownDeclaration<T extends Declaration>(decl: T): T;
44
43
  isStaticallyExported(decl: ts.Node): boolean;
@@ -10,7 +10,7 @@ import ts from 'typescript';
10
10
  import { Logger } from '../../../src/ngtsc/logging';
11
11
  import { ClassDeclaration, ClassMember, ClassMemberKind, CtorParameter, Declaration, DeclarationNode, Decorator, EnumMember, TypeScriptReflectionHost } from '../../../src/ngtsc/reflection';
12
12
  import { BundleProgram } from '../packages/bundle_program';
13
- import { NgccClassSymbol, NgccReflectionHost, SwitchableVariableDeclaration } from './ngcc_host';
13
+ import { NgccClassSymbol, NgccReflectionHost } from './ngcc_host';
14
14
  export declare const DECORATORS: ts.__String;
15
15
  export declare const PROP_DECORATORS: ts.__String;
16
16
  export declare const CONSTRUCTOR: ts.__String;
@@ -186,13 +186,6 @@ export declare class Esm2015ReflectionHost extends TypeScriptReflectionHost impl
186
186
  * injected by a migration will not be present in the returned collection.
187
187
  */
188
188
  getDecoratorsOfSymbol(symbol: NgccClassSymbol): Decorator[] | null;
189
- /**
190
- * Search the given module for variable declarations in which the initializer
191
- * is an identifier marked with the `PRE_R3_MARKER`.
192
- * @param module the module in which to search for switchable declarations.
193
- * @returns an array of variable declarations that match.
194
- */
195
- getSwitchableDeclarations(module: ts.Node): SwitchableVariableDeclaration[];
196
189
  getVariableValue(declaration: ts.VariableDeclaration): ts.Expression | null;
197
190
  /**
198
191
  * Find all top-level class symbols in the given file.
@@ -9,12 +9,6 @@
9
9
  import ts from 'typescript';
10
10
  import { ClassDeclaration, Declaration, Decorator, ReflectionHost } from '../../../src/ngtsc/reflection';
11
11
  import { SymbolWithValueDeclaration } from '../../../src/ngtsc/util/src/typescript';
12
- export declare const PRE_R3_MARKER = "__PRE_R3__";
13
- export declare const POST_R3_MARKER = "__POST_R3__";
14
- export declare type SwitchableVariableDeclaration = ts.VariableDeclaration & {
15
- initializer: ts.Identifier;
16
- };
17
- export declare function isSwitchableVariableDeclaration(node: ts.Node): node is SwitchableVariableDeclaration;
18
12
  /**
19
13
  * The symbol corresponding to a "class" declaration. I.e. a `ts.Symbol` whose `valueDeclaration` is
20
14
  * a `ClassDeclaration`.
@@ -60,13 +54,6 @@ export interface NgccReflectionHost extends ReflectionHost {
60
54
  * a "class" or has no symbol.
61
55
  */
62
56
  getClassSymbol(declaration: ts.Node): NgccClassSymbol | undefined;
63
- /**
64
- * Search the given module for variable declarations in which the initializer
65
- * is an identifier marked with the `PRE_R3_MARKER`.
66
- * @param module The module in which to search for switchable declarations.
67
- * @returns An array of variable declarations that match.
68
- */
69
- getSwitchableDeclarations(module: ts.Node): SwitchableVariableDeclaration[];
70
57
  /**
71
58
  * Retrieves all decorators of a given class symbol.
72
59
  * @param symbol Class symbol that can refer to a declaration which can hold decorators.
@@ -79,5 +79,8 @@ export declare function getImportsOfUmdModule(umdModule: UmdModule): {
79
79
  interface UmdModule {
80
80
  wrapperFn: ts.FunctionExpression;
81
81
  factoryFn: ts.FunctionExpression;
82
+ factoryCalls: Record<'amdDefine' | 'commonJs' | 'commonJs2' | 'global', ts.CallExpression | null> & {
83
+ cjsCallForImports: ts.CallExpression;
84
+ };
82
85
  }
83
86
  export {};
@@ -9,7 +9,7 @@
9
9
  import { AbsoluteFsPath } from '../../../src/ngtsc/file_system';
10
10
  import { PackageJsonUpdater } from '../writing/package_json_updater';
11
11
  import { EntryPointPackageJson, PackageJsonFormatProperties } from './entry_point';
12
- export declare const NGCC_VERSION = "13.1.0-next.1";
12
+ export declare const NGCC_VERSION = "13.2.0-next.0";
13
13
  /**
14
14
  * Returns true if there is a format in this entry-point that was compiled with an outdated version
15
15
  * of ngcc.
@@ -12,7 +12,6 @@ import { ReadonlyFileSystem } from '../../../src/ngtsc/file_system';
12
12
  import { Logger } from '../../../src/ngtsc/logging';
13
13
  import { ModuleWithProvidersAnalyses } from '../analysis/module_with_providers_analyzer';
14
14
  import { ExportInfo } from '../analysis/private_declarations_analyzer';
15
- import { SwitchMarkerAnalyses } from '../analysis/switch_marker_analyzer';
16
15
  import { CompiledFile } from '../analysis/types';
17
16
  import { NgccReflectionHost } from '../host/ngcc_host';
18
17
  import { RenderingFormatter } from '../rendering/rendering_formatter';
@@ -65,7 +64,6 @@ export declare class Transformer {
65
64
  export declare function hasErrors(diagnostics: ts.Diagnostic[]): boolean;
66
65
  interface ProgramAnalyses {
67
66
  decorationAnalyses: Map<ts.SourceFile, CompiledFile>;
68
- switchMarkerAnalyses: SwitchMarkerAnalyses;
69
67
  privateDeclarationsAnalyses: ExportInfo[];
70
68
  moduleWithProvidersAnalyses: ModuleWithProvidersAnalyses | null;
71
69
  diagnostics: ts.Diagnostic[];
@@ -15,7 +15,7 @@ import { Import, ImportManager } from '../../../src/ngtsc/translator';
15
15
  import { ModuleWithProvidersInfo } from '../analysis/module_with_providers_analyzer';
16
16
  import { ExportInfo } from '../analysis/private_declarations_analyzer';
17
17
  import { CompiledClass } from '../analysis/types';
18
- import { NgccReflectionHost, SwitchableVariableDeclaration } from '../host/ngcc_host';
18
+ import { NgccReflectionHost } from '../host/ngcc_host';
19
19
  import { RedundantDecoratorMap, RenderingFormatter } from './rendering_formatter';
20
20
  /**
21
21
  * A RenderingFormatter that works with ECMAScript Module import and export statements.
@@ -57,10 +57,6 @@ export declare class EsmRenderingFormatter implements RenderingFormatter {
57
57
  * Remove static decorator properties from classes.
58
58
  */
59
59
  removeDecorators(output: MagicString, decoratorsToRemove: RedundantDecoratorMap): void;
60
- /**
61
- * Rewrite the IVY switch markers to indicate we are in IVY mode.
62
- */
63
- rewriteSwitchableDeclarations(outputText: MagicString, sourceFile: ts.SourceFile, declarations: SwitchableVariableDeclaration[]): void;
64
60
  /**
65
61
  * Add the type parameters to the appropriate functions that return `ModuleWithProviders`
66
62
  * structures.
@@ -13,7 +13,6 @@ import { Logger } from '../../../src/ngtsc/logging';
13
13
  import { ImportManager } from '../../../src/ngtsc/translator';
14
14
  import { ParsedConfiguration } from '../../../src/perform_compile';
15
15
  import { PrivateDeclarationsAnalyses } from '../analysis/private_declarations_analyzer';
16
- import { SwitchMarkerAnalyses, SwitchMarkerAnalysis } from '../analysis/switch_marker_analyzer';
17
16
  import { CompiledFile, DecorationAnalyses } from '../analysis/types';
18
17
  import { NgccReflectionHost } from '../host/ngcc_host';
19
18
  import { EntryPointBundle } from '../packages/entry_point_bundle';
@@ -33,13 +32,13 @@ export declare class Renderer {
33
32
  private bundle;
34
33
  private tsConfig;
35
34
  constructor(host: NgccReflectionHost, srcFormatter: RenderingFormatter, fs: ReadonlyFileSystem, logger: Logger, bundle: EntryPointBundle, tsConfig?: ParsedConfiguration | null);
36
- renderProgram(decorationAnalyses: DecorationAnalyses, switchMarkerAnalyses: SwitchMarkerAnalyses, privateDeclarationsAnalyses: PrivateDeclarationsAnalyses): FileToWrite[];
35
+ renderProgram(decorationAnalyses: DecorationAnalyses, privateDeclarationsAnalyses: PrivateDeclarationsAnalyses): FileToWrite[];
37
36
  /**
38
37
  * Render the source code and source-map for an Analyzed file.
39
38
  * @param compiledFile The analyzed file to render.
40
39
  * @param targetPath The absolute path where the rendered file will be written.
41
40
  */
42
- renderFile(sourceFile: ts.SourceFile, compiledFile: CompiledFile | undefined, switchMarkerAnalysis: SwitchMarkerAnalysis | undefined, privateDeclarationsAnalyses: PrivateDeclarationsAnalyses): FileToWrite[];
41
+ renderFile(sourceFile: ts.SourceFile, compiledFile: CompiledFile | undefined, privateDeclarationsAnalyses: PrivateDeclarationsAnalyses): FileToWrite[];
43
42
  /**
44
43
  * From the given list of classes, computes a map of decorators that should be removed.
45
44
  * The decorators to remove are keyed by their container node, such that we can tell if
@@ -14,7 +14,6 @@ import { Import, ImportManager } from '../../../src/ngtsc/translator';
14
14
  import { ModuleWithProvidersInfo } from '../analysis/module_with_providers_analyzer';
15
15
  import { ExportInfo } from '../analysis/private_declarations_analyzer';
16
16
  import { CompiledClass } from '../analysis/types';
17
- import { SwitchableVariableDeclaration } from '../host/ngcc_host';
18
17
  /**
19
18
  * The collected decorators that have become redundant after the compilation
20
19
  * of Ivy static fields. The map is keyed by the container node, such that we
@@ -34,7 +33,6 @@ export interface RenderingFormatter {
34
33
  addDefinitions(output: MagicString, compiledClass: CompiledClass, definitions: string): void;
35
34
  addAdjacentStatements(output: MagicString, compiledClass: CompiledClass, statements: string): void;
36
35
  removeDecorators(output: MagicString, decoratorsToRemove: RedundantDecoratorMap): void;
37
- rewriteSwitchableDeclarations(outputText: MagicString, sourceFile: ts.SourceFile, declarations: SwitchableVariableDeclaration[]): void;
38
36
  addModuleWithProvidersParams(outputText: MagicString, moduleWithProviders: ModuleWithProvidersInfo[], importManager: ImportManager): void;
39
37
  printStatement(stmt: Statement, sourceFile: ts.SourceFile, importManager: ImportManager): string;
40
38
  }
@@ -31,13 +31,6 @@ export interface PartiallyOrderedList<T> extends Array<T> {
31
31
  export declare function getOriginalSymbol(checker: ts.TypeChecker): (symbol: ts.Symbol) => ts.Symbol;
32
32
  export declare function isDefined<T>(value: T | undefined | null): value is T;
33
33
  export declare function getNameText(name: ts.PropertyName | ts.BindingName): string;
34
- /**
35
- * Parse down the AST and capture all the nodes that satisfy the test.
36
- * @param node The start node.
37
- * @param test The function that tests whether a node should be included.
38
- * @returns a collection of nodes that satisfy the test.
39
- */
40
- export declare function findAll<T>(node: ts.Node, test: (node: ts.Node) => node is ts.Node & T): T[];
41
34
  /**
42
35
  * Does the given declaration have a name which is an identifier?
43
36
  * @param declaration The declaration to test.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/compiler-cli",
3
- "version": "13.1.0-next.1",
3
+ "version": "13.2.0-next.0",
4
4
  "description": "Angular - the compiler CLI for Node.js",
5
5
  "typings": "index.d.ts",
6
6
  "bin": {
@@ -66,8 +66,8 @@
66
66
  "yargs": "^17.2.1"
67
67
  },
68
68
  "peerDependencies": {
69
- "@angular/compiler": "13.1.0-next.1",
70
- "typescript": ">=4.4.2 <4.5"
69
+ "@angular/compiler": "13.2.0-next.0",
70
+ "typescript": ">=4.4.2 <4.6"
71
71
  },
72
72
  "repository": {
73
73
  "type": "git",
package/src/main.d.ts CHANGED
@@ -7,7 +7,7 @@
7
7
  */
8
8
  /// <amd-module name="@angular/compiler-cli/src/main" />
9
9
  import ts from 'typescript';
10
- import { Diagnostics, ParsedConfiguration } from './perform_compile';
10
+ import { ParsedConfiguration } from './perform_compile';
11
11
  import * as api from './transformers/api';
12
12
  declare type TsickleModule = typeof import('tsickle');
13
13
  export declare function main(args: string[], consoleError?: (s: string) => void, config?: NgcParsedConfiguration, customTransformers?: api.CustomTransformers, programReuse?: {
@@ -17,7 +17,7 @@ export declare function mainDiagnosticsForTest(args: string[], config?: NgcParse
17
17
  program: api.Program | undefined;
18
18
  }, modifiedResourceFiles?: Set<string> | null, tsickle?: TsickleModule): {
19
19
  exitCode: number;
20
- diagnostics: ReadonlyArray<ts.Diagnostic | api.Diagnostic>;
20
+ diagnostics: ReadonlyArray<ts.Diagnostic>;
21
21
  };
22
22
  export interface NgcParsedConfiguration extends ParsedConfiguration {
23
23
  watch?: boolean;
@@ -27,6 +27,6 @@ export declare function readCommandLineAndConfiguration(args: string[], existing
27
27
  export declare function watchMode(project: string, options: api.CompilerOptions, consoleError: (s: string) => void): {
28
28
  close: () => void;
29
29
  ready: (cb: () => void) => void;
30
- firstCompileResult: Diagnostics;
30
+ firstCompileResult: readonly ts.Diagnostic[];
31
31
  };
32
32
  export {};
@@ -42,12 +42,13 @@ export declare class DelegatingCompilerHost implements Omit<RequiredDelegations<
42
42
  readResource: ((fileName: string) => string | Promise<string>) | undefined;
43
43
  transformResource: ((data: string, context: import("@angular/compiler-cli/src/ngtsc/core/api/index").ResourceHostContext) => Promise<import("@angular/compiler-cli/src/ngtsc/core/api/index").TransformResourceResult | null>) | undefined;
44
44
  realpath: ((path: string) => string) | undefined;
45
- resolveModuleNames: ((moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, redirectedReference: ts.ResolvedProjectReference | undefined, options: ts.CompilerOptions) => (ts.ResolvedModule | undefined)[]) | undefined;
45
+ resolveModuleNames: ((moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, redirectedReference: ts.ResolvedProjectReference | undefined, options: ts.CompilerOptions, containingSourceFile?: ts.SourceFile | undefined) => (ts.ResolvedModule | undefined)[]) | undefined;
46
46
  resolveTypeReferenceDirectives: ((typeReferenceDirectiveNames: string[], containingFile: string, redirectedReference: ts.ResolvedProjectReference | undefined, options: ts.CompilerOptions) => (ts.ResolvedTypeReferenceDirective | undefined)[]) | undefined;
47
47
  resourceNameToFileName: ((resourceName: string, containingFilePath: string, fallbackResolve?: ((url: string, fromFile: string) => string | null) | undefined) => string | null) | undefined;
48
48
  trace: ((s: string) => void) | undefined;
49
49
  useCaseSensitiveFileNames: () => boolean;
50
50
  writeFile: ts.WriteFileCallback;
51
+ getModuleResolutionCache: any;
51
52
  }
52
53
  /**
53
54
  * A wrapper around `ts.CompilerHost` (plus any extension methods from `ExtendedTsCompilerHost`).
@@ -18,6 +18,11 @@ export declare class ArrayConcatBuiltinFn extends KnownFn {
18
18
  constructor(lhs: ResolvedValueArray);
19
19
  evaluate(node: ts.CallExpression, args: ResolvedValueArray): ResolvedValue;
20
20
  }
21
+ export declare class StringConcatBuiltinFn extends KnownFn {
22
+ private lhs;
23
+ constructor(lhs: string);
24
+ evaluate(node: ts.CallExpression, args: ResolvedValueArray): ResolvedValue;
25
+ }
21
26
  export declare class ObjectAssignBuiltinFn extends KnownFn {
22
27
  evaluate(node: ts.CallExpression, args: ResolvedValueArray): ResolvedValue;
23
28
  }
@@ -6,7 +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/program" />
9
- import { GeneratedFile } from '@angular/compiler';
10
9
  import ts from 'typescript';
11
10
  import * as api from '../transformers/api';
12
11
  import { NgCompiler } from './core';
@@ -33,9 +32,9 @@ export declare class NgtscProgram implements api.Program {
33
32
  getTsOptionDiagnostics(cancellationToken?: ts.CancellationToken | undefined): readonly ts.Diagnostic[];
34
33
  getTsSyntacticDiagnostics(sourceFile?: ts.SourceFile | undefined, cancellationToken?: ts.CancellationToken | undefined): readonly ts.Diagnostic[];
35
34
  getTsSemanticDiagnostics(sourceFile?: ts.SourceFile | undefined, cancellationToken?: ts.CancellationToken | undefined): readonly ts.Diagnostic[];
36
- getNgOptionDiagnostics(cancellationToken?: ts.CancellationToken | undefined): readonly (ts.Diagnostic | api.Diagnostic)[];
37
- getNgStructuralDiagnostics(cancellationToken?: ts.CancellationToken | undefined): readonly api.Diagnostic[];
38
- getNgSemanticDiagnostics(fileName?: string | undefined, cancellationToken?: ts.CancellationToken | undefined): readonly (ts.Diagnostic | api.Diagnostic)[];
35
+ getNgOptionDiagnostics(cancellationToken?: ts.CancellationToken | undefined): readonly ts.Diagnostic[];
36
+ getNgStructuralDiagnostics(cancellationToken?: ts.CancellationToken | undefined): readonly ts.Diagnostic[];
37
+ getNgSemanticDiagnostics(fileName?: string | undefined, cancellationToken?: ts.CancellationToken | undefined): readonly ts.Diagnostic[];
39
38
  /**
40
39
  * Ensure that the `NgCompiler` has properly analyzed the program, and allow for the asynchronous
41
40
  * loading of any resources during the process.
@@ -54,7 +53,5 @@ export declare class NgtscProgram implements api.Program {
54
53
  mergeEmitResultsCallback?: api.TsMergeEmitResultsCallback | undefined;
55
54
  } | undefined): ts.EmitResult;
56
55
  getIndexedComponents(): Map<DeclarationNode, IndexedComponent>;
57
- getLibrarySummaries(): Map<string, api.LibrarySummary>;
58
- getEmittedGeneratedFiles(): Map<string, GeneratedFile>;
59
56
  getEmittedSourceFiles(): Map<string, ts.SourceFile>;
60
57
  }
@@ -36,10 +36,11 @@ export declare class DelegatingCompilerHost implements Omit<RequiredDelegations<
36
36
  readDirectory: ((rootDir: string, extensions: readonly string[], excludes: readonly string[] | undefined, includes: readonly string[], depth?: number | undefined) => string[]) | undefined;
37
37
  readFile: (fileName: string) => string | undefined;
38
38
  realpath: ((path: string) => string) | undefined;
39
- resolveModuleNames: ((moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, redirectedReference: ts.ResolvedProjectReference | undefined, options: ts.CompilerOptions) => (ts.ResolvedModule | undefined)[]) | undefined;
39
+ resolveModuleNames: ((moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, redirectedReference: ts.ResolvedProjectReference | undefined, options: ts.CompilerOptions, containingSourceFile?: ts.SourceFile | undefined) => (ts.ResolvedModule | undefined)[]) | undefined;
40
40
  resolveTypeReferenceDirectives: ((typeReferenceDirectiveNames: string[], containingFile: string, redirectedReference: ts.ResolvedProjectReference | undefined, options: ts.CompilerOptions) => (ts.ResolvedTypeReferenceDirective | undefined)[]) | undefined;
41
41
  trace: ((s: string) => void) | undefined;
42
42
  useCaseSensitiveFileNames: () => boolean;
43
+ getModuleResolutionCache: any;
43
44
  }
44
45
  /**
45
46
  * Updates a `ts.Program` instance with a new one that incorporates specific changes, using the
@@ -290,7 +290,7 @@ export interface NoValueDeclaration {
290
290
  export interface TypeOnlyImport {
291
291
  kind: ValueUnavailableKind.TYPE_ONLY_IMPORT;
292
292
  typeNode: ts.TypeNode;
293
- importClause: ts.ImportClause;
293
+ node: ts.ImportClause | ts.ImportSpecifier;
294
294
  }
295
295
  export interface NamespaceImport {
296
296
  kind: ValueUnavailableKind.NAMESPACE;
@@ -62,3 +62,13 @@ export declare type RequiredDelegations<T> = {
62
62
  * Obtains the non-redirected source file for `sf`.
63
63
  */
64
64
  export declare function toUnredirectedSourceFile(sf: ts.SourceFile): ts.SourceFile;
65
+ /**
66
+ * Backwards-compatible version of `ts.createExportSpecifier`
67
+ * to handle a breaking change between 4.4 and 4.5.
68
+ */
69
+ export declare function createExportSpecifier(propertyName: string | ts.Identifier | undefined, name: string | ts.Identifier, isTypeOnly?: boolean): ts.ExportSpecifier;
70
+ /**
71
+ * Backwards-compatible version of `ts.createImportSpecifier`
72
+ * to handle a breaking change between 4.4 and 4.5.
73
+ */
74
+ export declare function createImportSpecifier(propertyName: string | ts.Identifier | undefined, name: string | ts.Identifier, isTypeOnly?: boolean): ts.ImportSpecifier;
@@ -6,15 +6,10 @@
6
6
  * found in the LICENSE file at https://angular.io/license
7
7
  */
8
8
  /// <amd-module name="@angular/compiler-cli/src/perform_compile" />
9
- import { Position } from '@angular/compiler';
10
9
  import ts from 'typescript';
11
10
  import { AbsoluteFsPath, ReadonlyFileSystem } from '../src/ngtsc/file_system';
12
11
  import * as api from './transformers/api';
13
- export declare type Diagnostics = ReadonlyArray<ts.Diagnostic | api.Diagnostic>;
14
- export declare function formatDiagnosticPosition(position: Position, host?: ts.FormatDiagnosticsHost): string;
15
- export declare function flattenDiagnosticMessageChain(chain: api.DiagnosticMessageChain, host?: ts.FormatDiagnosticsHost, indent?: number): string;
16
- export declare function formatDiagnostic(diagnostic: api.Diagnostic, host?: ts.FormatDiagnosticsHost): string;
17
- export declare function formatDiagnostics(diags: Diagnostics, host?: ts.FormatDiagnosticsHost): string;
12
+ export declare function formatDiagnostics(diags: ReadonlyArray<ts.Diagnostic>, host?: ts.FormatDiagnosticsHost): string;
18
13
  /** Used to read configuration files. */
19
14
  export declare type ConfigurationHost = Pick<ReadonlyFileSystem, 'readFile' | 'exists' | 'lstat' | 'resolve' | 'join' | 'dirname' | 'extname' | 'pwd'>;
20
15
  export interface ParsedConfiguration {
@@ -31,11 +26,11 @@ export declare function calcProjectFileAndBasePath(project: string, host?: Confi
31
26
  };
32
27
  export declare function readConfiguration(project: string, existingOptions?: api.CompilerOptions, host?: ConfigurationHost): ParsedConfiguration;
33
28
  export interface PerformCompilationResult {
34
- diagnostics: Diagnostics;
29
+ diagnostics: ReadonlyArray<ts.Diagnostic>;
35
30
  program?: api.Program;
36
31
  emitResult?: ts.EmitResult;
37
32
  }
38
- export declare function exitCodeFromResult(diags: Diagnostics | undefined): number;
33
+ export declare function exitCodeFromResult(diags: ReadonlyArray<ts.Diagnostic> | undefined): number;
39
34
  export declare function performCompilation({ rootNames, options, host, oldProgram, emitCallback, mergeEmitResultsCallback, gatherDiagnostics, customTransformers, emitFlags, modifiedResourceFiles }: {
40
35
  rootNames: string[];
41
36
  options: api.CompilerOptions;
@@ -43,9 +38,9 @@ export declare function performCompilation({ rootNames, options, host, oldProgra
43
38
  oldProgram?: api.Program;
44
39
  emitCallback?: api.TsEmitCallback;
45
40
  mergeEmitResultsCallback?: api.TsMergeEmitResultsCallback;
46
- gatherDiagnostics?: (program: api.Program) => Diagnostics;
41
+ gatherDiagnostics?: (program: api.Program) => ReadonlyArray<ts.Diagnostic>;
47
42
  customTransformers?: api.CustomTransformers;
48
43
  emitFlags?: api.EmitFlags;
49
44
  modifiedResourceFiles?: Set<string> | null;
50
45
  }): PerformCompilationResult;
51
- export declare function defaultGatherDiagnostics(program: api.Program): Diagnostics;
46
+ export declare function defaultGatherDiagnostics(program: api.Program): ReadonlyArray<ts.Diagnostic>;
@@ -7,7 +7,7 @@
7
7
  */
8
8
  /// <amd-module name="@angular/compiler-cli/src/perform_watch" />
9
9
  import ts from 'typescript';
10
- import { Diagnostics, ParsedConfiguration } from './perform_compile';
10
+ import { ParsedConfiguration } from './perform_compile';
11
11
  import * as api from './transformers/api';
12
12
  export declare enum FileChangeEvent {
13
13
  Change = 0,
@@ -15,7 +15,7 @@ export declare enum FileChangeEvent {
15
15
  CreateDeleteDir = 2
16
16
  }
17
17
  export interface PerformWatchHost {
18
- reportDiagnostics(diagnostics: Diagnostics): void;
18
+ reportDiagnostics(diagnostics: ReadonlyArray<ts.Diagnostic>): void;
19
19
  readConfiguration(): ParsedConfiguration;
20
20
  createCompilerHost(options: api.CompilerOptions): api.CompilerHost;
21
21
  createEmitCallback(options: api.CompilerOptions): api.TsEmitCallback | undefined;
@@ -25,12 +25,12 @@ export interface PerformWatchHost {
25
25
  setTimeout(callback: () => void, ms: number): any;
26
26
  clearTimeout(timeoutId: any): void;
27
27
  }
28
- export declare function createPerformWatchHost(configFileName: string, reportDiagnostics: (diagnostics: Diagnostics) => void, existingOptions?: ts.CompilerOptions, createEmitCallback?: (options: api.CompilerOptions) => api.TsEmitCallback | undefined): PerformWatchHost;
28
+ export declare function createPerformWatchHost(configFileName: string, reportDiagnostics: (diagnostics: ReadonlyArray<ts.Diagnostic>) => void, existingOptions?: ts.CompilerOptions, createEmitCallback?: (options: api.CompilerOptions) => api.TsEmitCallback | undefined): PerformWatchHost;
29
29
  /**
30
30
  * The logic in this function is adapted from `tsc.ts` from TypeScript.
31
31
  */
32
32
  export declare function performWatchCompilation(host: PerformWatchHost): {
33
33
  close: () => void;
34
34
  ready: (cb: () => void) => void;
35
- firstCompileResult: Diagnostics;
35
+ firstCompileResult: ReadonlyArray<ts.Diagnostic>;
36
36
  };
@@ -6,28 +6,12 @@
6
6
  * found in the LICENSE file at https://angular.io/license
7
7
  */
8
8
  /// <amd-module name="@angular/compiler-cli/src/transformers/api" />
9
- import { ParseSourceSpan, Position } from '@angular/compiler';
10
9
  import ts from 'typescript';
11
10
  import { ExtendedTsCompilerHost, NgCompilerOptions } from '../ngtsc/core/api';
12
11
  export declare const DEFAULT_ERROR_CODE = 100;
13
12
  export declare const UNKNOWN_ERROR_CODE = 500;
14
13
  export declare const SOURCE: "angular";
15
- export interface DiagnosticMessageChain {
16
- messageText: string;
17
- position?: Position;
18
- next?: DiagnosticMessageChain[];
19
- }
20
- export interface Diagnostic {
21
- messageText: string;
22
- span?: ParseSourceSpan;
23
- position?: Position;
24
- chain?: DiagnosticMessageChain;
25
- category: ts.DiagnosticCategory;
26
- code: number;
27
- source: 'angular';
28
- }
29
14
  export declare function isTsDiagnostic(diagnostic: any): diagnostic is ts.Diagnostic;
30
- export declare function isNgDiagnostic(diagnostic: any): diagnostic is Diagnostic;
31
15
  export interface CompilerOptions extends NgCompilerOptions, ts.CompilerOptions {
32
16
  genDir?: string;
33
17
  basePath?: string;
@@ -122,11 +106,6 @@ export interface TsEmitCallback {
122
106
  export interface TsMergeEmitResultsCallback {
123
107
  (results: ts.EmitResult[]): ts.EmitResult;
124
108
  }
125
- export interface LibrarySummary {
126
- fileName: string;
127
- text: string;
128
- sourceFile?: ts.SourceFile;
129
- }
130
109
  export interface LazyRoute {
131
110
  route: string;
132
111
  module: {
@@ -154,7 +133,7 @@ export interface Program {
154
133
  /**
155
134
  * Retrieve options diagnostics for the Angular options used to create the program.
156
135
  */
157
- getNgOptionDiagnostics(cancellationToken?: ts.CancellationToken): ReadonlyArray<ts.Diagnostic | Diagnostic>;
136
+ getNgOptionDiagnostics(cancellationToken?: ts.CancellationToken): ReadonlyArray<ts.Diagnostic>;
158
137
  /**
159
138
  * Retrieve the syntax diagnostics from TypeScript. This is faster than calling
160
139
  * `getTsProgram().getSyntacticDiagnostics()` since it does not need to collect Angular structural
@@ -172,7 +151,7 @@ export interface Program {
172
151
  *
173
152
  * Angular structural information is required to produce these diagnostics.
174
153
  */
175
- getNgStructuralDiagnostics(cancellationToken?: ts.CancellationToken): ReadonlyArray<Diagnostic>;
154
+ getNgStructuralDiagnostics(cancellationToken?: ts.CancellationToken): ReadonlyArray<ts.Diagnostic>;
176
155
  /**
177
156
  * Retrieve the semantic diagnostics from TypeScript. This is equivalent to calling
178
157
  * `getTsProgram().getSemanticDiagnostics()` directly and is included for completeness.
@@ -183,7 +162,7 @@ export interface Program {
183
162
  *
184
163
  * Angular structural information is required to produce these diagnostics.
185
164
  */
186
- getNgSemanticDiagnostics(fileName?: string, cancellationToken?: ts.CancellationToken): ReadonlyArray<ts.Diagnostic | Diagnostic>;
165
+ getNgSemanticDiagnostics(fileName?: string, cancellationToken?: ts.CancellationToken): ReadonlyArray<ts.Diagnostic>;
187
166
  /**
188
167
  * Load Angular structural information asynchronously. If this method is not called then the
189
168
  * Angular structural information, including referenced HTML and CSS files, are loaded
@@ -207,10 +186,4 @@ export interface Program {
207
186
  emitCallback?: TsEmitCallback;
208
187
  mergeEmitResultsCallback?: TsMergeEmitResultsCallback;
209
188
  }): ts.EmitResult;
210
- /**
211
- * Returns the .d.ts / .ngsummary.json / .ngfactory.d.ts files of libraries that have been emitted
212
- * in this program or previous programs with paths that emulate the fact that these libraries
213
- * have been compiled before with no outDir.
214
- */
215
- getLibrarySummaries(): Map<string, LibrarySummary>;
216
189
  }
@@ -6,106 +6,10 @@
6
6
  * found in the LICENSE file at https://angular.io/license
7
7
  */
8
8
  /// <amd-module name="@angular/compiler-cli/src/transformers/compiler_host" />
9
- import { AotCompilerHost, GeneratedFile, ParseSourceSpan } from '@angular/compiler';
10
9
  import ts from 'typescript';
11
- import { TypeCheckHost } from '../diagnostics/translate_diagnostics';
12
- import { ModuleMetadata } from '../metadata/index';
13
- import { CompilerHost, CompilerOptions, LibrarySummary } from './api';
10
+ import { CompilerHost, CompilerOptions } from './api';
14
11
  export declare function setWrapHostForTest(wrapFn: ((host: ts.CompilerHost) => ts.CompilerHost) | null): void;
15
12
  export declare function createCompilerHost({ options, tsHost }: {
16
13
  options: CompilerOptions;
17
14
  tsHost?: ts.CompilerHost;
18
15
  }): CompilerHost;
19
- export interface MetadataProvider {
20
- getMetadata(sourceFile: ts.SourceFile): ModuleMetadata | undefined;
21
- }
22
- export interface CodeGenerator {
23
- generateFile(genFileName: string, baseFileName?: string): GeneratedFile;
24
- findGeneratedFileNames(fileName: string): string[];
25
- }
26
- /**
27
- * Implements the following hosts based on an api.CompilerHost:
28
- * - ts.CompilerHost to be consumed by a ts.Program
29
- * - AotCompilerHost for @angular/compiler
30
- * - TypeCheckHost for mapping ts errors to ng errors (via translateDiagnostics)
31
- */
32
- export declare class TsCompilerAotCompilerTypeCheckHostAdapter implements ts.CompilerHost, AotCompilerHost, TypeCheckHost {
33
- private rootFiles;
34
- private options;
35
- private context;
36
- private metadataProvider;
37
- private codeGenerator;
38
- private librarySummaries;
39
- private metadataReaderCache;
40
- private fileNameToModuleNameCache;
41
- private flatModuleIndexCache;
42
- private flatModuleIndexNames;
43
- private flatModuleIndexRedirectNames;
44
- private rootDirs;
45
- private moduleResolutionCache;
46
- private originalSourceFiles;
47
- private originalFileExistsCache;
48
- private generatedSourceFiles;
49
- private generatedCodeFor;
50
- private emitter;
51
- private metadataReaderHost;
52
- getCancellationToken: () => ts.CancellationToken;
53
- getDefaultLibLocation: () => string;
54
- trace: (s: string) => void;
55
- getDirectories: (path: string) => string[];
56
- resolveTypeReferenceDirectives?: (names: string[], containingFile: string) => ts.ResolvedTypeReferenceDirective[];
57
- directoryExists?: (directoryName: string) => boolean;
58
- constructor(rootFiles: ReadonlyArray<string>, options: CompilerOptions, context: CompilerHost, metadataProvider: MetadataProvider, codeGenerator: CodeGenerator, librarySummaries?: Map<string, LibrarySummary>);
59
- private resolveModuleName;
60
- resolveModuleNames(moduleNames: string[], containingFile: string): ts.ResolvedModule[];
61
- moduleNameToFileName(m: string, containingFile?: string): string | null;
62
- /**
63
- * We want a moduleId that will appear in import statements in the generated code
64
- * which will be written to `containingFile`.
65
- *
66
- * Note that we also generate files for files in node_modules, as libraries
67
- * only ship .metadata.json files but not the generated code.
68
- *
69
- * Logic:
70
- * 1. if the importedFile and the containingFile are from the project sources
71
- * or from the same node_modules package, use a relative path
72
- * 2. if the importedFile is in a node_modules package,
73
- * use a path that starts with the package name.
74
- * 3. Error if the containingFile is in the node_modules package
75
- * and the importedFile is in the project soures,
76
- * as that is a violation of the principle that node_modules packages cannot
77
- * import project sources.
78
- */
79
- fileNameToModuleName(importedFile: string, containingFile: string): string;
80
- resourceNameToFileName(resourceName: string, containingFile: string): string | null;
81
- toSummaryFileName(fileName: string, referringSrcFileName: string): string;
82
- fromSummaryFileName(fileName: string, referringLibFileName: string): string;
83
- parseSourceSpanOf(fileName: string, line: number, character: number): ParseSourceSpan | null;
84
- private getOriginalSourceFile;
85
- updateGeneratedFile(genFile: GeneratedFile): ts.SourceFile;
86
- private addGeneratedFile;
87
- shouldGenerateFile(fileName: string): {
88
- generate: boolean;
89
- baseFileName?: string;
90
- };
91
- shouldGenerateFilesFor(fileName: string): string | boolean | null;
92
- getSourceFile(fileName: string, languageVersion: ts.ScriptTarget, onError?: ((message: string) => void) | undefined): ts.SourceFile;
93
- private getGeneratedFile;
94
- private originalFileExists;
95
- fileExists(fileName: string): boolean;
96
- loadSummary(filePath: string): string | null;
97
- isSourceFile(filePath: string): boolean;
98
- readFile(fileName: string): string | undefined;
99
- getMetadataFor(filePath: string): ModuleMetadata[] | undefined;
100
- loadResource(filePath: string): Promise<string> | string;
101
- getOutputName(filePath: string): string;
102
- private hasBundleIndex;
103
- getDefaultLibFileName: (options: ts.CompilerOptions) => string;
104
- getCurrentDirectory: () => string;
105
- getCanonicalFileName: (fileName: string) => string;
106
- useCaseSensitiveFileNames: () => boolean;
107
- getNewLine: () => string;
108
- realpath: (p: string) => string;
109
- writeFile: ts.WriteFileCallback;
110
- }
111
- export declare function getOriginalReferences(sourceFile: ts.SourceFile): ts.FileReference[] | undefined;
@@ -6,29 +6,10 @@
6
6
  * found in the LICENSE file at https://angular.io/license
7
7
  */
8
8
  /// <amd-module name="@angular/compiler-cli/src/transformers/program" />
9
- import * as path from 'path';
10
- import ts from 'typescript';
11
9
  import { CompilerHost, CompilerOptions, Program } from './api';
12
- export declare function setTempProgramHandlerForTest(handler: (program: ts.Program) => void): void;
13
- export declare function resetTempProgramHandlerForTest(): void;
14
10
  export declare function createProgram({ rootNames, options, host, oldProgram }: {
15
11
  rootNames: ReadonlyArray<string>;
16
12
  options: CompilerOptions;
17
13
  host: CompilerHost;
18
14
  oldProgram?: Program;
19
15
  }): Program;
20
- /**
21
- * Returns a function that can adjust a path from source path to out path,
22
- * based on an existing mapping from source to out path.
23
- *
24
- * TODO(tbosch): talk to the TypeScript team to expose their logic for calculating the `rootDir`
25
- * if none was specified.
26
- *
27
- * Note: This function works on normalized paths from typescript but should always return
28
- * POSIX normalized paths for output paths.
29
- */
30
- export declare function createSrcToOutPathMapper(outDir: string | undefined, sampleSrcFileName: string | undefined, sampleOutFileName: string | undefined, host?: {
31
- dirname: typeof path.dirname;
32
- resolve: typeof path.resolve;
33
- relative: typeof path.relative;
34
- }): (srcFileName: string) => string;