@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/src/metadata/schema.d.ts
DELETED
|
@@ -1,182 +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/schema" />
|
|
9
|
-
export declare const METADATA_VERSION = 4;
|
|
10
|
-
export declare type MetadataEntry = ClassMetadata | InterfaceMetadata | FunctionMetadata | MetadataValue;
|
|
11
|
-
export interface ModuleMetadata {
|
|
12
|
-
__symbolic: 'module';
|
|
13
|
-
version: number;
|
|
14
|
-
exports?: ModuleExportMetadata[];
|
|
15
|
-
importAs?: string;
|
|
16
|
-
metadata: {
|
|
17
|
-
[name: string]: MetadataEntry;
|
|
18
|
-
};
|
|
19
|
-
origins?: {
|
|
20
|
-
[name: string]: string;
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
export declare function isModuleMetadata(value: any): value is ModuleMetadata;
|
|
24
|
-
export interface ModuleExportMetadata {
|
|
25
|
-
export?: (string | {
|
|
26
|
-
name: string;
|
|
27
|
-
as: string;
|
|
28
|
-
})[];
|
|
29
|
-
from: string;
|
|
30
|
-
}
|
|
31
|
-
export interface ClassMetadata {
|
|
32
|
-
__symbolic: 'class';
|
|
33
|
-
extends?: MetadataSymbolicExpression | MetadataError;
|
|
34
|
-
arity?: number;
|
|
35
|
-
decorators?: (MetadataSymbolicExpression | MetadataError)[];
|
|
36
|
-
members?: MetadataMap;
|
|
37
|
-
statics?: {
|
|
38
|
-
[name: string]: MetadataValue | FunctionMetadata;
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
export declare function isClassMetadata(value: any): value is ClassMetadata;
|
|
42
|
-
export interface InterfaceMetadata {
|
|
43
|
-
__symbolic: 'interface';
|
|
44
|
-
}
|
|
45
|
-
export declare function isInterfaceMetadata(value: any): value is InterfaceMetadata;
|
|
46
|
-
export interface MetadataMap {
|
|
47
|
-
[name: string]: MemberMetadata[];
|
|
48
|
-
}
|
|
49
|
-
export interface MemberMetadata {
|
|
50
|
-
__symbolic: 'constructor' | 'method' | 'property';
|
|
51
|
-
decorators?: (MetadataSymbolicExpression | MetadataError)[];
|
|
52
|
-
parameters?: (MetadataSymbolicExpression | MetadataError | null | undefined)[];
|
|
53
|
-
}
|
|
54
|
-
export declare function isMemberMetadata(value: any): value is MemberMetadata;
|
|
55
|
-
export interface MethodMetadata extends MemberMetadata {
|
|
56
|
-
__symbolic: 'constructor' | 'method';
|
|
57
|
-
parameterDecorators?: ((MetadataSymbolicExpression | MetadataError)[] | undefined)[];
|
|
58
|
-
}
|
|
59
|
-
export declare function isMethodMetadata(value: any): value is MethodMetadata;
|
|
60
|
-
export interface ConstructorMetadata extends MethodMetadata {
|
|
61
|
-
__symbolic: 'constructor';
|
|
62
|
-
parameters?: (MetadataSymbolicExpression | MetadataError | null | undefined)[];
|
|
63
|
-
}
|
|
64
|
-
export declare function isConstructorMetadata(value: any): value is ConstructorMetadata;
|
|
65
|
-
export interface FunctionMetadata {
|
|
66
|
-
__symbolic: 'function';
|
|
67
|
-
parameters: string[];
|
|
68
|
-
defaults?: MetadataValue[];
|
|
69
|
-
value: MetadataValue;
|
|
70
|
-
}
|
|
71
|
-
export declare function isFunctionMetadata(value: any): value is FunctionMetadata;
|
|
72
|
-
export declare type MetadataValue = string | number | boolean | undefined | null | MetadataObject | MetadataArray | MetadataSymbolicExpression | MetadataSymbolicReferenceExpression | MetadataSymbolicBinaryExpression | MetadataSymbolicIndexExpression | MetadataSymbolicCallExpression | MetadataSymbolicPrefixExpression | MetadataSymbolicIfExpression | MetadataSymbolicSpreadExpression | MetadataSymbolicSelectExpression | MetadataError;
|
|
73
|
-
export interface MetadataObject {
|
|
74
|
-
[name: string]: MetadataValue;
|
|
75
|
-
}
|
|
76
|
-
export interface MetadataArray {
|
|
77
|
-
[name: number]: MetadataValue;
|
|
78
|
-
}
|
|
79
|
-
export declare type MetadataSymbolicExpression = MetadataSymbolicBinaryExpression | MetadataSymbolicIndexExpression | MetadataSymbolicIndexExpression | MetadataSymbolicCallExpression | MetadataSymbolicCallExpression | MetadataSymbolicPrefixExpression | MetadataSymbolicIfExpression | MetadataGlobalReferenceExpression | MetadataModuleReferenceExpression | MetadataImportedSymbolReferenceExpression | MetadataImportedDefaultReferenceExpression | MetadataSymbolicSelectExpression | MetadataSymbolicSpreadExpression;
|
|
80
|
-
export declare function isMetadataSymbolicExpression(value: any): value is MetadataSymbolicExpression;
|
|
81
|
-
export interface MetadataSymbolicBinaryExpression {
|
|
82
|
-
__symbolic: 'binary';
|
|
83
|
-
operator: '&&' | '||' | '|' | '^' | '&' | '==' | '!=' | '===' | '!==' | '<' | '>' | '<=' | '>=' | 'instanceof' | 'in' | 'as' | '<<' | '>>' | '>>>' | '+' | '-' | '*' | '/' | '%' | '**' | '??';
|
|
84
|
-
left: MetadataValue;
|
|
85
|
-
right: MetadataValue;
|
|
86
|
-
}
|
|
87
|
-
export declare function isMetadataSymbolicBinaryExpression(value: any): value is MetadataSymbolicBinaryExpression;
|
|
88
|
-
export interface MetadataSymbolicIndexExpression {
|
|
89
|
-
__symbolic: 'index';
|
|
90
|
-
expression: MetadataValue;
|
|
91
|
-
index: MetadataValue;
|
|
92
|
-
}
|
|
93
|
-
export declare function isMetadataSymbolicIndexExpression(value: any): value is MetadataSymbolicIndexExpression;
|
|
94
|
-
export interface MetadataSymbolicCallExpression {
|
|
95
|
-
__symbolic: 'call' | 'new';
|
|
96
|
-
expression: MetadataValue;
|
|
97
|
-
arguments?: MetadataValue[];
|
|
98
|
-
}
|
|
99
|
-
export declare function isMetadataSymbolicCallExpression(value: any): value is MetadataSymbolicCallExpression;
|
|
100
|
-
export interface MetadataSymbolicPrefixExpression {
|
|
101
|
-
__symbolic: 'pre';
|
|
102
|
-
operator: '+' | '-' | '~' | '!';
|
|
103
|
-
operand: MetadataValue;
|
|
104
|
-
}
|
|
105
|
-
export declare function isMetadataSymbolicPrefixExpression(value: any): value is MetadataSymbolicPrefixExpression;
|
|
106
|
-
export interface MetadataSymbolicIfExpression {
|
|
107
|
-
__symbolic: 'if';
|
|
108
|
-
condition: MetadataValue;
|
|
109
|
-
thenExpression: MetadataValue;
|
|
110
|
-
elseExpression: MetadataValue;
|
|
111
|
-
}
|
|
112
|
-
export declare function isMetadataSymbolicIfExpression(value: any): value is MetadataSymbolicIfExpression;
|
|
113
|
-
export interface MetadataSourceLocationInfo {
|
|
114
|
-
/**
|
|
115
|
-
* The line number of the error in the .ts file the metadata was created for.
|
|
116
|
-
*/
|
|
117
|
-
line?: number;
|
|
118
|
-
/**
|
|
119
|
-
* The number of utf8 code-units from the beginning of the file of the error.
|
|
120
|
-
*/
|
|
121
|
-
character?: number;
|
|
122
|
-
}
|
|
123
|
-
export interface MetadataGlobalReferenceExpression extends MetadataSourceLocationInfo {
|
|
124
|
-
__symbolic: 'reference';
|
|
125
|
-
name: string;
|
|
126
|
-
arguments?: MetadataValue[];
|
|
127
|
-
}
|
|
128
|
-
export declare function isMetadataGlobalReferenceExpression(value: any): value is MetadataGlobalReferenceExpression;
|
|
129
|
-
export interface MetadataModuleReferenceExpression extends MetadataSourceLocationInfo {
|
|
130
|
-
__symbolic: 'reference';
|
|
131
|
-
module: string;
|
|
132
|
-
}
|
|
133
|
-
export declare function isMetadataModuleReferenceExpression(value: any): value is MetadataModuleReferenceExpression;
|
|
134
|
-
export interface MetadataImportedSymbolReferenceExpression extends MetadataSourceLocationInfo {
|
|
135
|
-
__symbolic: 'reference';
|
|
136
|
-
module: string;
|
|
137
|
-
name: string;
|
|
138
|
-
arguments?: MetadataValue[];
|
|
139
|
-
}
|
|
140
|
-
export declare function isMetadataImportedSymbolReferenceExpression(value: any): value is MetadataImportedSymbolReferenceExpression;
|
|
141
|
-
export interface MetadataImportedDefaultReferenceExpression extends MetadataSourceLocationInfo {
|
|
142
|
-
__symbolic: 'reference';
|
|
143
|
-
module: string;
|
|
144
|
-
default: boolean;
|
|
145
|
-
arguments?: MetadataValue[];
|
|
146
|
-
}
|
|
147
|
-
export declare function isMetadataImportDefaultReference(value: any): value is MetadataImportedDefaultReferenceExpression;
|
|
148
|
-
export declare type MetadataSymbolicReferenceExpression = MetadataGlobalReferenceExpression | MetadataModuleReferenceExpression | MetadataImportedSymbolReferenceExpression | MetadataImportedDefaultReferenceExpression;
|
|
149
|
-
export declare function isMetadataSymbolicReferenceExpression(value: any): value is MetadataSymbolicReferenceExpression;
|
|
150
|
-
export interface MetadataSymbolicSelectExpression {
|
|
151
|
-
__symbolic: 'select';
|
|
152
|
-
expression: MetadataValue;
|
|
153
|
-
member: string;
|
|
154
|
-
}
|
|
155
|
-
export declare function isMetadataSymbolicSelectExpression(value: any): value is MetadataSymbolicSelectExpression;
|
|
156
|
-
export interface MetadataSymbolicSpreadExpression {
|
|
157
|
-
__symbolic: 'spread';
|
|
158
|
-
expression: MetadataValue;
|
|
159
|
-
}
|
|
160
|
-
export declare function isMetadataSymbolicSpreadExpression(value: any): value is MetadataSymbolicSpreadExpression;
|
|
161
|
-
export interface MetadataError extends MetadataSourceLocationInfo {
|
|
162
|
-
__symbolic: 'error';
|
|
163
|
-
/**
|
|
164
|
-
* This message should be short and relatively discriptive and should be fixed once it is created.
|
|
165
|
-
* If the reader doesn't recognize the message, it will display the message unmodified. If the
|
|
166
|
-
* reader recognizes the error message is it free to use substitute message the is more
|
|
167
|
-
* descriptive and/or localized.
|
|
168
|
-
*/
|
|
169
|
-
message: string;
|
|
170
|
-
/**
|
|
171
|
-
* The module of the error (only used in bundled metadata)
|
|
172
|
-
*/
|
|
173
|
-
module?: string;
|
|
174
|
-
/**
|
|
175
|
-
* Context information that can be used to generate a more descriptive error message. The content
|
|
176
|
-
* of the context is dependent on the error message.
|
|
177
|
-
*/
|
|
178
|
-
context?: {
|
|
179
|
-
[name: string]: string;
|
|
180
|
-
};
|
|
181
|
-
}
|
|
182
|
-
export declare function isMetadataError(value: any): value is MetadataError;
|
|
@@ -1,22 +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/symbols" />
|
|
9
|
-
import ts from 'typescript';
|
|
10
|
-
import { MetadataSymbolicReferenceExpression, MetadataValue } from './schema';
|
|
11
|
-
export declare class Symbols {
|
|
12
|
-
private sourceFile;
|
|
13
|
-
private _symbols;
|
|
14
|
-
private references;
|
|
15
|
-
constructor(sourceFile: ts.SourceFile);
|
|
16
|
-
resolve(name: string, preferReference?: boolean): MetadataValue | undefined;
|
|
17
|
-
define(name: string, value: MetadataValue): void;
|
|
18
|
-
defineReference(name: string, value: MetadataSymbolicReferenceExpression): void;
|
|
19
|
-
has(name: string): boolean;
|
|
20
|
-
private get symbols();
|
|
21
|
-
private buildImports;
|
|
22
|
-
}
|
|
@@ -1,26 +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/transformers/inline_resources" />
|
|
9
|
-
import ts from 'typescript';
|
|
10
|
-
import { MetadataObject, MetadataValue } from '../metadata/index';
|
|
11
|
-
import { MetadataTransformer, ValueTransform } from './metadata_cache';
|
|
12
|
-
/** A subset of members from AotCompilerHost */
|
|
13
|
-
export declare type ResourcesHost = {
|
|
14
|
-
resourceNameToFileName(resourceName: string, containingFileName: string): string | null;
|
|
15
|
-
loadResource(path: string): Promise<string> | string;
|
|
16
|
-
};
|
|
17
|
-
export declare type StaticResourceLoader = {
|
|
18
|
-
get(url: string | MetadataValue): string;
|
|
19
|
-
};
|
|
20
|
-
export declare class InlineResourcesMetadataTransformer implements MetadataTransformer {
|
|
21
|
-
private host;
|
|
22
|
-
constructor(host: ResourcesHost);
|
|
23
|
-
start(sourceFile: ts.SourceFile): ValueTransform | undefined;
|
|
24
|
-
updateDecoratorMetadata(loader: StaticResourceLoader, arg: MetadataObject): MetadataObject;
|
|
25
|
-
}
|
|
26
|
-
export declare function getInlineResourcesTransformFactory(program: ts.Program, host: ResourcesHost): ts.TransformerFactory<ts.SourceFile>;
|
|
@@ -1,30 +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/transformers/lower_expressions" />
|
|
9
|
-
import ts from 'typescript';
|
|
10
|
-
import { MetadataCache, MetadataTransformer, ValueTransform } from './metadata_cache';
|
|
11
|
-
export interface LoweringRequest {
|
|
12
|
-
kind: ts.SyntaxKind;
|
|
13
|
-
location: number;
|
|
14
|
-
end: number;
|
|
15
|
-
name: string;
|
|
16
|
-
}
|
|
17
|
-
export declare type RequestLocationMap = Map<number, LoweringRequest>;
|
|
18
|
-
export declare function getExpressionLoweringTransformFactory(requestsMap: RequestsMap, program: ts.Program): (context: ts.TransformationContext) => (sourceFile: ts.SourceFile) => ts.SourceFile;
|
|
19
|
-
export interface RequestsMap {
|
|
20
|
-
getRequests(sourceFile: ts.SourceFile): RequestLocationMap;
|
|
21
|
-
}
|
|
22
|
-
export declare class LowerMetadataTransform implements RequestsMap, MetadataTransformer {
|
|
23
|
-
private cache;
|
|
24
|
-
private requests;
|
|
25
|
-
private lowerableFieldNames;
|
|
26
|
-
constructor(lowerableFieldNames: string[]);
|
|
27
|
-
getRequests(sourceFile: ts.SourceFile): RequestLocationMap;
|
|
28
|
-
connect(cache: MetadataCache): void;
|
|
29
|
-
start(sourceFile: ts.SourceFile): ValueTransform | undefined;
|
|
30
|
-
}
|
|
@@ -1,27 +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/transformers/metadata_cache" />
|
|
9
|
-
import ts from 'typescript';
|
|
10
|
-
import { MetadataCollector, MetadataValue, ModuleMetadata } from '../metadata/index';
|
|
11
|
-
import { MetadataProvider } from './compiler_host';
|
|
12
|
-
export declare type ValueTransform = (value: MetadataValue, node: ts.Node) => MetadataValue;
|
|
13
|
-
export interface MetadataTransformer {
|
|
14
|
-
connect?(cache: MetadataCache): void;
|
|
15
|
-
start(sourceFile: ts.SourceFile): ValueTransform | undefined;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Cache, and potentially transform, metadata as it is being collected.
|
|
19
|
-
*/
|
|
20
|
-
export declare class MetadataCache implements MetadataProvider {
|
|
21
|
-
private collector;
|
|
22
|
-
private readonly strict;
|
|
23
|
-
private transformers;
|
|
24
|
-
private metadataCache;
|
|
25
|
-
constructor(collector: MetadataCollector, strict: boolean, transformers: MetadataTransformer[]);
|
|
26
|
-
getMetadata(sourceFile: ts.SourceFile): ModuleMetadata | undefined;
|
|
27
|
-
}
|
|
@@ -1,19 +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/transformers/metadata_reader" />
|
|
9
|
-
import { ModuleMetadata } from '../metadata';
|
|
10
|
-
export interface MetadataReaderHost {
|
|
11
|
-
getSourceFileMetadata(filePath: string): ModuleMetadata | undefined;
|
|
12
|
-
cacheMetadata?(fileName: string): boolean;
|
|
13
|
-
fileExists(filePath: string): boolean;
|
|
14
|
-
readFile(filePath: string): string;
|
|
15
|
-
}
|
|
16
|
-
export interface MetadataReaderCache {
|
|
17
|
-
}
|
|
18
|
-
export declare function createMetadataReaderCache(): MetadataReaderCache;
|
|
19
|
-
export declare function readMetadata(filePath: string, host: MetadataReaderHost, cache?: MetadataReaderCache): ModuleMetadata[] | undefined;
|
|
@@ -1,105 +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/transformers/node_emitter" />
|
|
9
|
-
import { AssertNotNull, BinaryOperatorExpr, CastExpr, ClassStmt, CommaExpr, ConditionalExpr, DeclareFunctionStmt, DeclareVarStmt, ExpressionStatement, ExpressionVisitor, ExternalExpr, FunctionExpr, IfStmt, InstantiateExpr, InvokeFunctionExpr, LiteralArrayExpr, LiteralExpr, LiteralMapExpr, LocalizedString, NotExpr, ParseSourceSpan, PartialModule, ReadKeyExpr, ReadPropExpr, ReadVarExpr, ReturnStatement, Statement, StatementVisitor, TaggedTemplateExpr, ThrowStmt, TryCatchStmt, TypeofExpr, UnaryOperatorExpr, WrappedNodeExpr, WriteKeyExpr, WritePropExpr, WriteVarExpr } from '@angular/compiler';
|
|
10
|
-
import ts from 'typescript';
|
|
11
|
-
export interface Node {
|
|
12
|
-
sourceSpan: ParseSourceSpan | null;
|
|
13
|
-
}
|
|
14
|
-
export declare class TypeScriptNodeEmitter {
|
|
15
|
-
private annotateForClosureCompiler;
|
|
16
|
-
constructor(annotateForClosureCompiler: boolean);
|
|
17
|
-
updateSourceFile(sourceFile: ts.SourceFile, stmts: Statement[], preamble?: string): [
|
|
18
|
-
ts.SourceFile,
|
|
19
|
-
Map<ts.Node, Node>
|
|
20
|
-
];
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Update the given source file to include the changes specified in module.
|
|
24
|
-
*
|
|
25
|
-
* The module parameter is treated as a partial module meaning that the statements are added to
|
|
26
|
-
* the module instead of replacing the module. Also, any classes are treated as partial classes
|
|
27
|
-
* and the included members are added to the class with the same name instead of a new class
|
|
28
|
-
* being created.
|
|
29
|
-
*/
|
|
30
|
-
export declare function updateSourceFile(sourceFile: ts.SourceFile, module: PartialModule, annotateForClosureCompiler: boolean): [ts.SourceFile, Map<ts.Node, Node>];
|
|
31
|
-
export declare type RecordedNode<T extends ts.Node = ts.Node> = (T & {
|
|
32
|
-
__recorded: any;
|
|
33
|
-
}) | null;
|
|
34
|
-
/**
|
|
35
|
-
* Visits an output ast and produces the corresponding TypeScript synthetic nodes.
|
|
36
|
-
*/
|
|
37
|
-
export declare class NodeEmitterVisitor implements StatementVisitor, ExpressionVisitor {
|
|
38
|
-
private annotateForClosureCompiler;
|
|
39
|
-
private _nodeMap;
|
|
40
|
-
private _importsWithPrefixes;
|
|
41
|
-
private _reexports;
|
|
42
|
-
private _templateSources;
|
|
43
|
-
private _exportedVariableIdentifiers;
|
|
44
|
-
constructor(annotateForClosureCompiler: boolean);
|
|
45
|
-
/**
|
|
46
|
-
* Process the source file and collect exported identifiers that refer to variables.
|
|
47
|
-
*
|
|
48
|
-
* Only variables are collected because exported classes still exist in the module scope in
|
|
49
|
-
* CommonJS, whereas variables have their declarations moved onto the `exports` object, and all
|
|
50
|
-
* references are updated accordingly.
|
|
51
|
-
*/
|
|
52
|
-
loadExportedVariableIdentifiers(sourceFile: ts.SourceFile): void;
|
|
53
|
-
getReexports(): ts.Statement[];
|
|
54
|
-
getImports(): ts.Statement[];
|
|
55
|
-
getNodeMap(): Map<ts.Node, Node>;
|
|
56
|
-
updateSourceMap(statements: ts.Statement[]): void;
|
|
57
|
-
private postProcess;
|
|
58
|
-
private sourceRangeOf;
|
|
59
|
-
private getModifiers;
|
|
60
|
-
visitDeclareVarStmt(stmt: DeclareVarStmt): (ts.VariableStatement & {
|
|
61
|
-
__recorded: any;
|
|
62
|
-
}) | ((ts.VariableStatement & {
|
|
63
|
-
__recorded: any;
|
|
64
|
-
}) | (ts.ExportDeclaration & {
|
|
65
|
-
__recorded: any;
|
|
66
|
-
}) | null)[] | null;
|
|
67
|
-
visitDeclareFunctionStmt(stmt: DeclareFunctionStmt): RecordedNode<ts.FunctionDeclaration>;
|
|
68
|
-
visitExpressionStmt(stmt: ExpressionStatement): RecordedNode<ts.ExpressionStatement>;
|
|
69
|
-
visitReturnStmt(stmt: ReturnStatement): RecordedNode<ts.ReturnStatement>;
|
|
70
|
-
visitDeclareClassStmt(stmt: ClassStmt): RecordedNode<ts.ClassDeclaration>;
|
|
71
|
-
visitIfStmt(stmt: IfStmt): RecordedNode<ts.IfStatement>;
|
|
72
|
-
visitTryCatchStmt(stmt: TryCatchStmt): RecordedNode<ts.TryStatement>;
|
|
73
|
-
visitThrowStmt(stmt: ThrowStmt): RecordedNode<ts.ThrowStatement>;
|
|
74
|
-
visitWrappedNodeExpr(expr: WrappedNodeExpr<any>): any;
|
|
75
|
-
visitTypeofExpr(expr: TypeofExpr): RecordedNode<ts.TypeOfExpression>;
|
|
76
|
-
visitReadVarExpr(expr: ReadVarExpr): (ts.Identifier & {
|
|
77
|
-
__recorded: any;
|
|
78
|
-
}) | (ts.SuperExpression & {
|
|
79
|
-
__recorded: any;
|
|
80
|
-
}) | null;
|
|
81
|
-
visitWriteVarExpr(expr: WriteVarExpr): RecordedNode<ts.BinaryExpression>;
|
|
82
|
-
visitWriteKeyExpr(expr: WriteKeyExpr): RecordedNode<ts.BinaryExpression>;
|
|
83
|
-
visitWritePropExpr(expr: WritePropExpr): RecordedNode<ts.BinaryExpression>;
|
|
84
|
-
visitInvokeFunctionExpr(expr: InvokeFunctionExpr): RecordedNode<ts.CallExpression>;
|
|
85
|
-
visitTaggedTemplateExpr(expr: TaggedTemplateExpr): RecordedNode<ts.TaggedTemplateExpression>;
|
|
86
|
-
visitInstantiateExpr(expr: InstantiateExpr): RecordedNode<ts.NewExpression>;
|
|
87
|
-
visitLiteralExpr(expr: LiteralExpr): RecordedNode<ts.Identifier | ts.NullLiteral | ts.StringLiteral>;
|
|
88
|
-
visitLocalizedString(expr: LocalizedString, context: any): void;
|
|
89
|
-
visitExternalExpr(expr: ExternalExpr): RecordedNode<ts.Expression>;
|
|
90
|
-
visitConditionalExpr(expr: ConditionalExpr): RecordedNode<ts.ParenthesizedExpression>;
|
|
91
|
-
visitNotExpr(expr: NotExpr): RecordedNode<ts.PrefixUnaryExpression>;
|
|
92
|
-
visitAssertNotNullExpr(expr: AssertNotNull): RecordedNode<ts.Expression>;
|
|
93
|
-
visitCastExpr(expr: CastExpr): RecordedNode<ts.Expression>;
|
|
94
|
-
visitFunctionExpr(expr: FunctionExpr): RecordedNode<ts.FunctionExpression>;
|
|
95
|
-
visitUnaryOperatorExpr(expr: UnaryOperatorExpr): RecordedNode<ts.UnaryExpression | ts.ParenthesizedExpression>;
|
|
96
|
-
visitBinaryOperatorExpr(expr: BinaryOperatorExpr): RecordedNode<ts.BinaryExpression | ts.ParenthesizedExpression>;
|
|
97
|
-
visitReadPropExpr(expr: ReadPropExpr): RecordedNode<ts.PropertyAccessExpression>;
|
|
98
|
-
visitReadKeyExpr(expr: ReadKeyExpr): RecordedNode<ts.ElementAccessExpression>;
|
|
99
|
-
visitLiteralArrayExpr(expr: LiteralArrayExpr): RecordedNode<ts.ArrayLiteralExpression>;
|
|
100
|
-
visitLiteralMapExpr(expr: LiteralMapExpr): RecordedNode<ts.ObjectLiteralExpression>;
|
|
101
|
-
visitCommaExpr(expr: CommaExpr): RecordedNode<ts.Expression>;
|
|
102
|
-
private _visitStatements;
|
|
103
|
-
private _visitStatementsPrefix;
|
|
104
|
-
private _visitIdentifier;
|
|
105
|
-
}
|
|
@@ -1,19 +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/transformers/node_emitter_transform" />
|
|
9
|
-
import { GeneratedFile } from '@angular/compiler';
|
|
10
|
-
import ts from 'typescript';
|
|
11
|
-
/**
|
|
12
|
-
* Returns a transformer that does two things for generated files (ngfactory etc):
|
|
13
|
-
* - adds a fileoverview JSDoc comment containing Closure Compiler specific "suppress"ions in JSDoc.
|
|
14
|
-
* The new comment will contain any fileoverview comment text from the original source file this
|
|
15
|
-
* file was generated from.
|
|
16
|
-
* - updates generated files that are not in the given map of generatedFiles to have an empty
|
|
17
|
-
* list of statements as their body.
|
|
18
|
-
*/
|
|
19
|
-
export declare function getAngularEmitterTransformFactory(generatedFiles: Map<string, GeneratedFile>, program: ts.Program, annotateForClosureCompiler: boolean): () => (sourceFile: ts.SourceFile) => ts.SourceFile;
|
|
@@ -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/transformers/r3_metadata_transform" />
|
|
9
|
-
import { PartialModule } from '@angular/compiler';
|
|
10
|
-
import ts from 'typescript';
|
|
11
|
-
import { MetadataTransformer, ValueTransform } from './metadata_cache';
|
|
12
|
-
export declare class PartialModuleMetadataTransformer implements MetadataTransformer {
|
|
13
|
-
private moduleMap;
|
|
14
|
-
constructor(modules: PartialModule[]);
|
|
15
|
-
start(sourceFile: ts.SourceFile): ValueTransform | undefined;
|
|
16
|
-
}
|
|
@@ -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/transformers/r3_transform" />
|
|
9
|
-
import { PartialModule } from '@angular/compiler';
|
|
10
|
-
import ts from 'typescript';
|
|
11
|
-
export declare type Transformer = (sourceFile: ts.SourceFile) => ts.SourceFile;
|
|
12
|
-
export declare type TransformerFactory = (context: ts.TransformationContext) => Transformer;
|
|
13
|
-
/**
|
|
14
|
-
* Returns a transformer that adds the requested static methods specified by modules.
|
|
15
|
-
*/
|
|
16
|
-
export declare function getAngularClassTransformerFactory(modules: PartialModule[], annotateForClosureCompiler: boolean): TransformerFactory;
|