@angular/compiler-cli 13.0.3 → 13.1.0-next.3
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.
- package/bundles/chunk-4EDYFHXN.js +681 -0
- package/bundles/chunk-4EDYFHXN.js.map +6 -0
- package/bundles/chunk-7HBAJSZA.js +5106 -0
- package/bundles/chunk-7HBAJSZA.js.map +6 -0
- package/bundles/chunk-7HVF6UHR.js +380 -0
- package/bundles/chunk-7HVF6UHR.js.map +6 -0
- package/bundles/chunk-COAETSNP.js +7531 -0
- package/bundles/chunk-COAETSNP.js.map +6 -0
- package/bundles/chunk-EP5JHXG2.js +448 -0
- package/bundles/chunk-EP5JHXG2.js.map +6 -0
- package/bundles/chunk-GLCRIILX.js +206 -0
- package/bundles/chunk-GLCRIILX.js.map +6 -0
- package/bundles/chunk-HDZS2JG2.js +1265 -0
- package/bundles/chunk-HDZS2JG2.js.map +6 -0
- package/bundles/chunk-IESRH26X.js +5684 -0
- package/bundles/chunk-IESRH26X.js.map +6 -0
- package/bundles/chunk-JJMLEEKA.js +382 -0
- package/bundles/chunk-JJMLEEKA.js.map +6 -0
- package/bundles/chunk-MFCLQBFK.js +968 -0
- package/bundles/chunk-MFCLQBFK.js.map +6 -0
- package/bundles/chunk-QDWL7SZJ.js +29 -0
- package/bundles/chunk-QDWL7SZJ.js.map +6 -0
- package/bundles/chunk-QL6ZC3U3.js +424 -0
- package/bundles/chunk-QL6ZC3U3.js.map +6 -0
- package/bundles/chunk-SKBLJA43.js +56 -0
- package/bundles/chunk-SKBLJA43.js.map +6 -0
- package/bundles/chunk-UIKTHF6Z.js +2177 -0
- package/bundles/chunk-UIKTHF6Z.js.map +6 -0
- package/bundles/chunk-UMUIU7TE.js +116 -0
- package/bundles/chunk-UMUIU7TE.js.map +6 -0
- package/bundles/chunk-XA5IZLLC.js +68 -0
- package/bundles/chunk-XA5IZLLC.js.map +6 -0
- package/bundles/index.js +67 -20229
- package/bundles/index.js.map +2 -2
- package/bundles/linker/babel/index.js +17 -1980
- package/bundles/linker/babel/index.js.map +2 -2
- package/bundles/linker/index.js +12 -1833
- package/bundles/linker/index.js.map +2 -2
- package/bundles/ngcc/index.js +24 -16040
- package/bundles/ngcc/index.js.map +2 -2
- package/bundles/ngcc/main-ngcc.js +16 -16124
- package/bundles/ngcc/main-ngcc.js.map +2 -2
- package/bundles/ngcc/src/execution/cluster/ngcc_cluster_worker.js +27 -13782
- package/bundles/ngcc/src/execution/cluster/ngcc_cluster_worker.js.map +2 -2
- package/bundles/ngcc/src/locking/lock_file_with_child_process/ngcc_lock_unlocker.js +10 -309
- package/bundles/ngcc/src/locking/lock_file_with_child_process/ngcc_lock_unlocker.js.map +2 -2
- package/bundles/private/bazel.js +4 -81
- package/bundles/private/bazel.js.map +2 -2
- package/bundles/private/localize.js +27 -870
- package/bundles/private/localize.js.map +2 -2
- package/bundles/private/migrations.js +13 -2178
- package/bundles/private/migrations.js.map +2 -2
- package/bundles/private/tooling.js +7 -931
- package/bundles/private/tooling.js.map +2 -2
- package/bundles/src/bin/ng_xi18n.js +20 -20378
- package/bundles/src/bin/ng_xi18n.js.map +2 -2
- package/bundles/src/bin/ngc.js +15 -20392
- package/bundles/src/bin/ngc.js.map +2 -2
- package/bundles_metadata.json +1 -1
- package/index.d.ts +0 -1
- package/ngcc/src/packages/build_marker.d.ts +1 -1
- package/package.json +3 -3
- package/src/ngtsc/core/src/host.d.ts +2 -1
- package/src/ngtsc/program_driver/src/ts_create_program_driver.d.ts +2 -1
- package/src/ngtsc/reflection/src/host.d.ts +1 -1
- package/src/ngtsc/util/src/typescript.d.ts +10 -0
- package/src/transformers/compiler_host.d.ts +1 -97
- package/src/transformers/program.d.ts +0 -19
- package/src/transformers/util.d.ts +1 -18
- package/src/{diagnostics/typescript_version.d.ts → version_helpers.d.ts} +1 -1
- package/src/diagnostics/translate_diagnostics.d.ts +0 -18
- package/src/language_services.d.ts +0 -11
- package/src/metadata/bundle_index_host.d.ts +0 -16
- package/src/metadata/bundler.d.ts +0 -66
- package/src/metadata/collector.d.ts +0 -44
- package/src/metadata/evaluator.d.ts +0 -58
- package/src/metadata/index.d.ts +0 -11
- package/src/metadata/index_writer.d.ts +0 -10
- package/src/metadata/schema.d.ts +0 -182
- package/src/metadata/symbols.d.ts +0 -22
- package/src/transformers/inline_resources.d.ts +0 -26
- package/src/transformers/lower_expressions.d.ts +0 -30
- package/src/transformers/metadata_cache.d.ts +0 -27
- package/src/transformers/metadata_reader.d.ts +0 -19
- package/src/transformers/node_emitter.d.ts +0 -105
- package/src/transformers/node_emitter_transform.d.ts +0 -19
- package/src/transformers/r3_metadata_transform.d.ts +0 -16
- package/src/transformers/r3_transform.d.ts +0 -16
package/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/// <amd-module name="@angular/compiler-cli" />
|
|
2
2
|
export { AotCompilerHost, AotCompilerHost as StaticReflectorHost, StaticReflector, StaticSymbol } from '@angular/compiler';
|
|
3
3
|
export { VERSION } from './src/version';
|
|
4
|
-
export * from './src/metadata';
|
|
5
4
|
export * from './src/transformers/api';
|
|
6
5
|
export * from './src/transformers/entry_points';
|
|
7
6
|
export * from './src/perform_compile';
|
|
@@ -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.0.3";
|
|
12
|
+
export declare const NGCC_VERSION = "13.1.0-next.3";
|
|
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.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/compiler-cli",
|
|
3
|
-
"version": "13.0.3",
|
|
3
|
+
"version": "13.1.0-next.3",
|
|
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.0.3",
|
|
70
|
-
"typescript": ">=4.4.2 <4.
|
|
69
|
+
"@angular/compiler": "13.1.0-next.3",
|
|
70
|
+
"typescript": ">=4.4.2 <4.6"
|
|
71
71
|
},
|
|
72
72
|
"repository": {
|
|
73
73
|
"type": "git",
|
|
@@ -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`).
|
|
@@ -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
|
-
|
|
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,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 {
|
|
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;
|
|
@@ -7,21 +7,10 @@
|
|
|
7
7
|
*/
|
|
8
8
|
/// <amd-module name="@angular/compiler-cli/src/transformers/util" />
|
|
9
9
|
import ts from 'typescript';
|
|
10
|
-
import {
|
|
10
|
+
import { Diagnostic } from './api';
|
|
11
11
|
export declare const GENERATED_FILES: RegExp;
|
|
12
|
-
export declare const DTS: RegExp;
|
|
13
|
-
export declare const TS: RegExp;
|
|
14
|
-
export declare const enum StructureIsReused {
|
|
15
|
-
Not = 0,
|
|
16
|
-
SafeModules = 1,
|
|
17
|
-
Completely = 2
|
|
18
|
-
}
|
|
19
|
-
export declare function tsStructureIsReused(program: ts.Program): StructureIsReused;
|
|
20
12
|
export declare function error(msg: string): never;
|
|
21
|
-
export declare function userError(msg: string): never;
|
|
22
13
|
export declare function createMessageDiagnostic(messageText: string): ts.Diagnostic & Diagnostic;
|
|
23
|
-
export declare function isInRootDir(fileName: string, options: CompilerOptions): string | true | null;
|
|
24
|
-
export declare function relativeToRootDirs(filePath: string, rootDirs: string[]): string;
|
|
25
14
|
/**
|
|
26
15
|
* Converts a ng.Diagnostic into a ts.Diagnostic.
|
|
27
16
|
* This looses some information, and also uses an incomplete object as `file`.
|
|
@@ -29,9 +18,3 @@ export declare function relativeToRootDirs(filePath: string, rootDirs: string[])
|
|
|
29
18
|
* I.e. only use this where the API allows only a ts.Diagnostic.
|
|
30
19
|
*/
|
|
31
20
|
export declare function ngToTsDiagnostic(ng: Diagnostic): ts.Diagnostic;
|
|
32
|
-
/**
|
|
33
|
-
* Strip multiline comment start and end markers from the `commentText` string.
|
|
34
|
-
*
|
|
35
|
-
* This will also strip the JSDOC comment start marker (`/**`).
|
|
36
|
-
*/
|
|
37
|
-
export declare function stripComment(commentText: string): string;
|
|
@@ -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
|
-
/// <amd-module name="@angular/compiler-cli/src/
|
|
8
|
+
/// <amd-module name="@angular/compiler-cli/src/version_helpers" />
|
|
9
9
|
/**
|
|
10
10
|
* Converts a `string` version into an array of numbers
|
|
11
11
|
* @example
|
|
@@ -1,18 +0,0 @@
|
|
|
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
|
-
/// <amd-module name="@angular/compiler-cli/src/diagnostics/translate_diagnostics" />
|
|
9
|
-
import { ParseSourceSpan } from '@angular/compiler';
|
|
10
|
-
import ts from 'typescript';
|
|
11
|
-
import { Diagnostic } from '../transformers/api';
|
|
12
|
-
export interface TypeCheckHost {
|
|
13
|
-
parseSourceSpanOf(fileName: string, line: number, character: number): ParseSourceSpan | null;
|
|
14
|
-
}
|
|
15
|
-
export declare function translateDiagnostics(host: TypeCheckHost, untranslatedDiagnostics: ReadonlyArray<ts.Diagnostic>): {
|
|
16
|
-
ts: ts.Diagnostic[];
|
|
17
|
-
ng: Diagnostic[];
|
|
18
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
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
|
-
/// <amd-module name="@angular/compiler-cli/src/language_services" />
|
|
9
|
-
export { MetadataCollector, ModuleMetadata } from './metadata';
|
|
10
|
-
export { CompilerOptions } from './transformers/api';
|
|
11
|
-
export { createMetadataReaderCache, MetadataReaderCache, MetadataReaderHost, readMetadata } from './transformers/metadata_reader';
|
|
@@ -1,16 +0,0 @@
|
|
|
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
|
-
/// <amd-module name="@angular/compiler-cli/src/metadata/bundle_index_host" />
|
|
9
|
-
import ts from 'typescript';
|
|
10
|
-
import { CompilerOptions } from '../transformers/api';
|
|
11
|
-
import { MetadataCache } from '../transformers/metadata_cache';
|
|
12
|
-
export declare function createBundleIndexHost<H extends ts.CompilerHost>(ngOptions: CompilerOptions, rootFiles: ReadonlyArray<string>, host: H, getMetadataCache: () => MetadataCache): {
|
|
13
|
-
host: H;
|
|
14
|
-
indexName?: string;
|
|
15
|
-
errors?: ts.Diagnostic[];
|
|
16
|
-
};
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
/// <amd-module name="@angular/compiler-cli/src/metadata/bundler" />
|
|
2
|
-
import ts from 'typescript';
|
|
3
|
-
import { MetadataCache } from '../transformers/metadata_cache';
|
|
4
|
-
import { MetadataEntry, ModuleMetadata } from './schema';
|
|
5
|
-
export interface BundleEntries {
|
|
6
|
-
[name: string]: MetadataEntry;
|
|
7
|
-
}
|
|
8
|
-
export interface BundlePrivateEntry {
|
|
9
|
-
privateName: string;
|
|
10
|
-
name: string;
|
|
11
|
-
module: string;
|
|
12
|
-
}
|
|
13
|
-
export interface BundledModule {
|
|
14
|
-
metadata: ModuleMetadata;
|
|
15
|
-
privates: BundlePrivateEntry[];
|
|
16
|
-
}
|
|
17
|
-
export interface MetadataBundlerHost {
|
|
18
|
-
getMetadataFor(moduleName: string, containingFile: string): ModuleMetadata | undefined;
|
|
19
|
-
}
|
|
20
|
-
export declare class MetadataBundler {
|
|
21
|
-
private root;
|
|
22
|
-
private importAs;
|
|
23
|
-
private host;
|
|
24
|
-
private symbolMap;
|
|
25
|
-
private metadataCache;
|
|
26
|
-
private exports;
|
|
27
|
-
private rootModule;
|
|
28
|
-
private privateSymbolPrefix;
|
|
29
|
-
private exported;
|
|
30
|
-
constructor(root: string, importAs: string | undefined, host: MetadataBundlerHost, privateSymbolPrefix?: string);
|
|
31
|
-
getMetadataBundle(): BundledModule;
|
|
32
|
-
static resolveModule(importName: string, from: string): string;
|
|
33
|
-
private getMetadata;
|
|
34
|
-
private exportAll;
|
|
35
|
-
/**
|
|
36
|
-
* Fill in the canonicalSymbol which is the symbol that should be imported by factories.
|
|
37
|
-
* The canonical symbol is the one exported by the index file for the bundle or definition
|
|
38
|
-
* symbol for private symbols that are not exported by bundle index.
|
|
39
|
-
*/
|
|
40
|
-
private canonicalizeSymbols;
|
|
41
|
-
private canonicalizeSymbol;
|
|
42
|
-
private getEntries;
|
|
43
|
-
private getReExports;
|
|
44
|
-
private convertSymbol;
|
|
45
|
-
private convertEntry;
|
|
46
|
-
private convertClass;
|
|
47
|
-
private convertMembers;
|
|
48
|
-
private convertMember;
|
|
49
|
-
private convertStatics;
|
|
50
|
-
private convertFunction;
|
|
51
|
-
private convertValue;
|
|
52
|
-
private convertExpression;
|
|
53
|
-
private convertError;
|
|
54
|
-
private convertReference;
|
|
55
|
-
private convertExpressionNode;
|
|
56
|
-
private symbolOf;
|
|
57
|
-
private canonicalSymbolOf;
|
|
58
|
-
}
|
|
59
|
-
export declare class CompilerHostAdapter implements MetadataBundlerHost {
|
|
60
|
-
private host;
|
|
61
|
-
private cache;
|
|
62
|
-
private options;
|
|
63
|
-
private collector;
|
|
64
|
-
constructor(host: ts.CompilerHost, cache: MetadataCache | null, options: ts.CompilerOptions);
|
|
65
|
-
getMetadataFor(fileName: string, containingFile: string): ModuleMetadata | undefined;
|
|
66
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
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
|
-
/// <amd-module name="@angular/compiler-cli/src/metadata/collector" />
|
|
9
|
-
import ts from 'typescript';
|
|
10
|
-
import { MetadataValue, ModuleMetadata } from './schema';
|
|
11
|
-
/**
|
|
12
|
-
* A set of collector options to use when collecting metadata.
|
|
13
|
-
*/
|
|
14
|
-
export interface CollectorOptions {
|
|
15
|
-
/**
|
|
16
|
-
* Version of the metadata to collect.
|
|
17
|
-
*/
|
|
18
|
-
version?: number;
|
|
19
|
-
/**
|
|
20
|
-
* Collect a hidden field "$quoted$" in objects literals that record when the key was quoted in
|
|
21
|
-
* the source.
|
|
22
|
-
*/
|
|
23
|
-
quotedNames?: boolean;
|
|
24
|
-
/**
|
|
25
|
-
* Do not simplify invalid expressions.
|
|
26
|
-
*/
|
|
27
|
-
verboseInvalidExpression?: boolean;
|
|
28
|
-
/**
|
|
29
|
-
* An expression substitution callback.
|
|
30
|
-
*/
|
|
31
|
-
substituteExpression?: (value: MetadataValue, node: ts.Node) => MetadataValue;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Collect decorator metadata from a TypeScript module.
|
|
35
|
-
*/
|
|
36
|
-
export declare class MetadataCollector {
|
|
37
|
-
private options;
|
|
38
|
-
constructor(options?: CollectorOptions);
|
|
39
|
-
/**
|
|
40
|
-
* Returns a JSON.stringify friendly form describing the decorators of the exported classes from
|
|
41
|
-
* the source file that is expected to correspond to a module.
|
|
42
|
-
*/
|
|
43
|
-
getMetadata(sourceFile: ts.SourceFile, strict?: boolean, substituteExpression?: (value: MetadataValue, node: ts.Node) => MetadataValue): ModuleMetadata | undefined;
|
|
44
|
-
}
|
|
@@ -1,58 +0,0 @@
|
|
|
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
|
-
/// <amd-module name="@angular/compiler-cli/src/metadata/evaluator" />
|
|
9
|
-
import ts from 'typescript';
|
|
10
|
-
import { CollectorOptions } from './collector';
|
|
11
|
-
import { MetadataEntry, MetadataError, MetadataValue } from './schema';
|
|
12
|
-
import { Symbols } from './symbols';
|
|
13
|
-
export declare function isPrimitive(value: any): boolean;
|
|
14
|
-
export interface ImportSpecifierMetadata {
|
|
15
|
-
name: string;
|
|
16
|
-
propertyName?: string;
|
|
17
|
-
}
|
|
18
|
-
export interface ImportMetadata {
|
|
19
|
-
defaultName?: string;
|
|
20
|
-
namespace?: string;
|
|
21
|
-
namedImports?: ImportSpecifierMetadata[];
|
|
22
|
-
from: string;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Produce a symbolic representation of an expression folding values into their final value when
|
|
26
|
-
* possible.
|
|
27
|
-
*/
|
|
28
|
-
export declare class Evaluator {
|
|
29
|
-
private symbols;
|
|
30
|
-
private nodeMap;
|
|
31
|
-
private options;
|
|
32
|
-
private recordExport?;
|
|
33
|
-
constructor(symbols: Symbols, nodeMap: Map<MetadataEntry, ts.Node>, options?: CollectorOptions, recordExport?: ((name: string, value: MetadataValue) => void) | undefined);
|
|
34
|
-
nameOf(node: ts.Node | undefined): string | MetadataError;
|
|
35
|
-
/**
|
|
36
|
-
* Returns true if the expression represented by `node` can be folded into a literal expression.
|
|
37
|
-
*
|
|
38
|
-
* For example, a literal is always foldable. This means that literal expressions such as `1.2`
|
|
39
|
-
* `"Some value"` `true` `false` are foldable.
|
|
40
|
-
*
|
|
41
|
-
* - An object literal is foldable if all the properties in the literal are foldable.
|
|
42
|
-
* - An array literal is foldable if all the elements are foldable.
|
|
43
|
-
* - A call is foldable if it is a call to a Array.prototype.concat or a call to CONST_EXPR.
|
|
44
|
-
* - A property access is foldable if the object is foldable.
|
|
45
|
-
* - A array index is foldable if index expression is foldable and the array is foldable.
|
|
46
|
-
* - Binary operator expressions are foldable if the left and right expressions are foldable and
|
|
47
|
-
* it is one of '+', '-', '*', '/', '%', '||', and '&&'.
|
|
48
|
-
* - An identifier is foldable if a value can be found for its symbol in the evaluator symbol
|
|
49
|
-
* table.
|
|
50
|
-
*/
|
|
51
|
-
isFoldable(node: ts.Node): boolean;
|
|
52
|
-
private isFoldableWorker;
|
|
53
|
-
/**
|
|
54
|
-
* Produce a JSON serialiable object representing `node`. The foldable values in the expression
|
|
55
|
-
* tree are folded. For example, a node representing `1 + 2` is folded into `3`.
|
|
56
|
-
*/
|
|
57
|
-
evaluateNode(node: ts.Node, preferReference?: boolean): MetadataValue;
|
|
58
|
-
}
|
package/src/metadata/index.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
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
|
-
/// <amd-module name="@angular/compiler-cli/src/metadata/index" />
|
|
9
|
-
export * from './collector';
|
|
10
|
-
export * from './schema';
|
|
11
|
-
export * from './bundle_index_host';
|
|
@@ -1,10 +0,0 @@
|
|
|
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
|
-
/// <amd-module name="@angular/compiler-cli/src/metadata/index_writer" />
|
|
9
|
-
import { BundlePrivateEntry } from './bundler';
|
|
10
|
-
export declare function privateEntriesToIndex(index: string, privates: BundlePrivateEntry[]): string;
|