@angular/compiler-cli 15.1.0-next.0 → 15.1.0-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/{chunk-KGTNU2UU.js → chunk-4ENQEGGA.js} +5 -5
- package/bundles/{chunk-KGTNU2UU.js.map → chunk-4ENQEGGA.js.map} +0 -0
- package/bundles/{chunk-LHZD6YT2.js → chunk-BGOUKBDI.js} +35 -35
- package/bundles/chunk-BGOUKBDI.js.map +6 -0
- package/bundles/{chunk-VOEFUUJH.js → chunk-DLVFMDSC.js} +2 -2
- package/bundles/{chunk-VOEFUUJH.js.map → chunk-DLVFMDSC.js.map} +0 -0
- package/bundles/{chunk-NXGWYLNC.js → chunk-E7DPJFUS.js} +7 -7
- package/bundles/{chunk-NXGWYLNC.js.map → chunk-E7DPJFUS.js.map} +0 -0
- package/bundles/{chunk-UUIUKASM.js → chunk-IZN5U2AM.js} +11 -2
- package/bundles/chunk-IZN5U2AM.js.map +6 -0
- package/bundles/{chunk-QKS2XPFG.js → chunk-KY7HVS6H.js} +87 -77
- package/bundles/chunk-KY7HVS6H.js.map +6 -0
- package/bundles/{chunk-XVHC4VAO.js → chunk-MAF2KC4N.js} +8 -8
- package/bundles/{chunk-XVHC4VAO.js.map → chunk-MAF2KC4N.js.map} +1 -1
- package/bundles/{chunk-FPQZA7NP.js → chunk-OFXSI6E3.js} +3 -3
- package/bundles/{chunk-FPQZA7NP.js.map → chunk-OFXSI6E3.js.map} +0 -0
- package/bundles/{chunk-22N3RTKA.js → chunk-OHYTYUA4.js} +7 -7
- package/bundles/{chunk-22N3RTKA.js.map → chunk-OHYTYUA4.js.map} +0 -0
- package/bundles/{chunk-A6MA5NDQ.js → chunk-ONRVYLCK.js} +128 -129
- package/bundles/chunk-ONRVYLCK.js.map +6 -0
- package/bundles/{chunk-JZDWEOSI.js → chunk-PPMCRK4H.js} +74 -73
- package/bundles/{chunk-JZDWEOSI.js.map → chunk-PPMCRK4H.js.map} +1 -1
- package/bundles/{chunk-6TLW4724.js → chunk-PPWXQG65.js} +51 -49
- package/bundles/{chunk-6TLW4724.js.map → chunk-PPWXQG65.js.map} +1 -1
- package/bundles/{chunk-JY5KP5YT.js → chunk-QVO57CDR.js} +4 -4
- package/bundles/{chunk-JY5KP5YT.js.map → chunk-QVO57CDR.js.map} +0 -0
- package/bundles/{chunk-OKDR75TI.js → chunk-TTNJEW7O.js} +7 -7
- package/bundles/{chunk-OKDR75TI.js.map → chunk-TTNJEW7O.js.map} +0 -0
- package/bundles/{chunk-TZNP5L2W.js → chunk-UN4WV3U4.js} +35 -30
- package/bundles/chunk-UN4WV3U4.js.map +6 -0
- package/bundles/{chunk-GIA6ASYG.js → chunk-Y6MBLTIR.js} +7 -7
- package/bundles/{chunk-GIA6ASYG.js.map → chunk-Y6MBLTIR.js.map} +0 -0
- package/bundles/index.js +19 -19
- package/bundles/index.js.map +1 -1
- package/bundles/linker/babel/index.js +13 -13
- package/bundles/linker/index.js +5 -5
- package/bundles/ngcc/index.js +13 -13
- package/bundles/ngcc/main-ngcc.js +14 -14
- package/bundles/ngcc/src/execution/cluster/ngcc_cluster_worker.js +20 -19
- package/bundles/ngcc/src/execution/cluster/ngcc_cluster_worker.js.map +1 -1
- package/bundles/ngcc/src/locking/lock_file_with_child_process/ngcc_lock_unlocker.js +4 -4
- package/bundles/private/bazel.js +1 -1
- package/bundles/private/localize.js +3 -3
- package/bundles/private/migrations.js +6 -6
- package/bundles/private/tooling.js +3 -3
- package/bundles/src/bin/ng_xi18n.js +11 -11
- package/bundles/src/bin/ngc.js +9 -9
- package/bundles_metadata.json +1 -1
- package/linker/babel/src/babel_core.d.ts +4 -4
- package/linker/babel/src/babel_declaration_scope.d.ts +1 -1
- package/linker/src/ast/ast_value.d.ts +11 -16
- package/linker/src/file_linker/get_source_file.d.ts +1 -1
- package/ngcc/src/analysis/module_with_providers_analyzer.d.ts +1 -1
- package/ngcc/src/analysis/private_declarations_analyzer.d.ts +1 -1
- package/ngcc/src/analysis/types.d.ts +1 -1
- package/ngcc/src/dependencies/dependency_resolver.d.ts +1 -1
- package/ngcc/src/dependencies/module_resolver.d.ts +1 -1
- package/ngcc/src/execution/api.d.ts +3 -3
- package/ngcc/src/execution/cluster/api.d.ts +2 -2
- package/ngcc/src/execution/tasks/api.d.ts +4 -4
- package/ngcc/src/execution/tasks/completion.d.ts +1 -1
- package/ngcc/src/host/esm2015_host.d.ts +5 -5
- package/ngcc/src/host/ngcc_host.d.ts +1 -1
- package/ngcc/src/ngcc_options.d.ts +6 -6
- package/ngcc/src/packages/build_marker.d.ts +1 -1
- package/ngcc/src/packages/entry_point.d.ts +4 -4
- package/ngcc/src/packages/entry_point_manifest.d.ts +2 -2
- package/ngcc/src/packages/transformer.d.ts +1 -1
- package/ngcc/src/path_mappings.d.ts +1 -1
- package/ngcc/src/rendering/rendering_formatter.d.ts +1 -1
- package/ngcc/src/utils.d.ts +2 -2
- package/ngcc/src/writing/package_json_updater.d.ts +3 -3
- package/package.json +4 -4
- package/src/main.d.ts +1 -1
- package/src/ngtsc/annotations/common/src/di.d.ts +1 -1
- package/src/ngtsc/annotations/common/src/factory.d.ts +1 -1
- package/src/ngtsc/annotations/component/src/metadata.d.ts +2 -2
- package/src/ngtsc/annotations/component/src/resources.d.ts +1 -1
- package/src/ngtsc/core/api/src/adapter.d.ts +1 -1
- package/src/ngtsc/core/src/compiler.d.ts +1 -1
- package/src/ngtsc/core/src/host.d.ts +1 -1
- package/src/ngtsc/file_system/src/logical.d.ts +1 -1
- package/src/ngtsc/file_system/src/types.d.ts +4 -4
- package/src/ngtsc/imports/src/emitter.d.ts +2 -2
- package/src/ngtsc/incremental/src/state.d.ts +1 -1
- package/src/ngtsc/indexer/src/api.d.ts +1 -1
- package/src/ngtsc/metadata/src/inheritance.d.ts +1 -1
- package/src/ngtsc/metadata/src/property_mapping.d.ts +2 -2
- package/src/ngtsc/partial_evaluator/src/interface.d.ts +1 -1
- package/src/ngtsc/partial_evaluator/src/interpreter.d.ts +1 -1
- package/src/ngtsc/partial_evaluator/src/result.d.ts +1 -1
- package/src/ngtsc/perf/src/clock.d.ts +1 -1
- package/src/ngtsc/program_driver/src/ts_create_program_driver.d.ts +1 -1
- package/src/ngtsc/reflection/src/host.d.ts +9 -9
- package/src/ngtsc/scope/src/api.d.ts +1 -1
- package/src/ngtsc/scope/src/typecheck.d.ts +1 -1
- package/src/ngtsc/transform/src/trait.d.ts +1 -1
- package/src/ngtsc/translator/src/api/ast_factory.d.ts +3 -3
- package/src/ngtsc/translator/src/translator.d.ts +1 -1
- package/src/ngtsc/ts_compatibility/src/ts_cross_version_utils.d.ts +50 -14
- package/src/ngtsc/typecheck/api/api.d.ts +3 -3
- package/src/ngtsc/typecheck/api/completion.d.ts +1 -1
- package/src/ngtsc/typecheck/api/scope.d.ts +1 -1
- package/src/ngtsc/typecheck/api/symbols.d.ts +3 -3
- package/src/ngtsc/typecheck/src/type_emitter.d.ts +1 -1
- package/src/ngtsc/util/src/typescript.d.ts +3 -3
- package/src/ngtsc/util/src/visitor.d.ts +1 -1
- package/src/perform_compile.d.ts +1 -1
- package/bundles/chunk-A6MA5NDQ.js.map +0 -6
- package/bundles/chunk-LHZD6YT2.js.map +0 -6
- package/bundles/chunk-QKS2XPFG.js.map +0 -6
- package/bundles/chunk-TZNP5L2W.js.map +0 -6
- package/bundles/chunk-UUIUKASM.js.map +0 -6
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
import * as _babelNamespace from '@babel/core';
|
|
29
29
|
import _typesNamespace = _babelNamespace.types;
|
|
30
30
|
export import types = _typesNamespace;
|
|
31
|
-
export
|
|
32
|
-
export
|
|
33
|
-
export
|
|
34
|
-
export
|
|
31
|
+
export type BabelFile = _babelNamespace.BabelFile;
|
|
32
|
+
export type PluginObj = _babelNamespace.PluginObj;
|
|
33
|
+
export type ConfigAPI = _babelNamespace.ConfigAPI;
|
|
34
|
+
export type NodePath<T = _babelNamespace.Node> = _babelNamespace.NodePath<T>;
|
|
35
35
|
export declare const NodePath: typeof _babelNamespace.NodePath;
|
|
36
36
|
export declare const transformSync: typeof _babelNamespace.transformSync;
|
|
37
37
|
export declare const parse: typeof _babelNamespace.parse;
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
import { NodePath, Scope } from '@babel/traverse';
|
|
10
10
|
import { DeclarationScope } from '../../../linker';
|
|
11
11
|
import { types as t } from './babel_core';
|
|
12
|
-
export
|
|
12
|
+
export type ConstantScopePath = NodePath<t.FunctionDeclaration> | NodePath<t.FunctionExpression> | NodePath<t.Program>;
|
|
13
13
|
/**
|
|
14
14
|
* This class represents the lexical scope of a partial declaration in Babel source code.
|
|
15
15
|
*
|
|
@@ -11,29 +11,24 @@ import { AstHost, Range } from './ast_host';
|
|
|
11
11
|
/**
|
|
12
12
|
* Represents only those types in `T` that are object types.
|
|
13
13
|
*/
|
|
14
|
-
|
|
14
|
+
type ObjectType<T> = Extract<T, object>;
|
|
15
15
|
/**
|
|
16
16
|
* Represents the value type of an object literal.
|
|
17
17
|
*/
|
|
18
|
-
|
|
18
|
+
type ObjectValueType<T> = T extends Record<string, infer R> ? R : never;
|
|
19
19
|
/**
|
|
20
20
|
* Represents the value type of an array literal.
|
|
21
21
|
*/
|
|
22
|
-
|
|
22
|
+
type ArrayValueType<T> = T extends Array<infer R> ? R : never;
|
|
23
23
|
/**
|
|
24
24
|
* Ensures that `This` has its generic type `Actual` conform to the expected generic type in
|
|
25
25
|
* `Expected`, to disallow calling a method if the generic type does not conform.
|
|
26
26
|
*/
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Ensures that `This` is an `AstValue` whose generic type conforms to `Expected`, to disallow
|
|
30
|
-
* calling a method if the value's type does not conform.
|
|
31
|
-
*/
|
|
32
|
-
declare type HasValueType<This, Expected> = This extends AstValue<infer Actual, any> ? ConformsTo<This, Actual, Expected> : never;
|
|
27
|
+
type ConformsTo<This, Actual, Expected> = Actual extends Expected ? This : never;
|
|
33
28
|
/**
|
|
34
29
|
* Represents only the string keys of type `T`.
|
|
35
30
|
*/
|
|
36
|
-
|
|
31
|
+
type PropertyKey<T> = keyof T & string;
|
|
37
32
|
/**
|
|
38
33
|
* This helper class wraps an object expression along with an `AstHost` object, exposing helper
|
|
39
34
|
* methods that make it easier to extract the properties of the object.
|
|
@@ -145,7 +140,7 @@ export declare class AstValue<T, TExpression> {
|
|
|
145
140
|
/**
|
|
146
141
|
* Parse the number from this value, or error if it is not a number.
|
|
147
142
|
*/
|
|
148
|
-
getNumber(this:
|
|
143
|
+
getNumber(this: ConformsTo<this, T, number>): number;
|
|
149
144
|
/**
|
|
150
145
|
* Is this value a string?
|
|
151
146
|
*/
|
|
@@ -153,7 +148,7 @@ export declare class AstValue<T, TExpression> {
|
|
|
153
148
|
/**
|
|
154
149
|
* Parse the string from this value, or error if it is not a string.
|
|
155
150
|
*/
|
|
156
|
-
getString(this:
|
|
151
|
+
getString(this: ConformsTo<this, T, string>): string;
|
|
157
152
|
/**
|
|
158
153
|
* Is this value a boolean?
|
|
159
154
|
*/
|
|
@@ -161,7 +156,7 @@ export declare class AstValue<T, TExpression> {
|
|
|
161
156
|
/**
|
|
162
157
|
* Parse the boolean from this value, or error if it is not a boolean.
|
|
163
158
|
*/
|
|
164
|
-
getBoolean(this:
|
|
159
|
+
getBoolean(this: ConformsTo<this, T, boolean>): boolean;
|
|
165
160
|
/**
|
|
166
161
|
* Is this value an object literal?
|
|
167
162
|
*/
|
|
@@ -169,7 +164,7 @@ export declare class AstValue<T, TExpression> {
|
|
|
169
164
|
/**
|
|
170
165
|
* Parse this value into an `AstObject`, or error if it is not an object literal.
|
|
171
166
|
*/
|
|
172
|
-
getObject(this:
|
|
167
|
+
getObject(this: ConformsTo<this, T, object>): AstObject<ObjectType<T>, TExpression>;
|
|
173
168
|
/**
|
|
174
169
|
* Is this value an array literal?
|
|
175
170
|
*/
|
|
@@ -177,7 +172,7 @@ export declare class AstValue<T, TExpression> {
|
|
|
177
172
|
/**
|
|
178
173
|
* Parse this value into an array of `AstValue` objects, or error if it is not an array literal.
|
|
179
174
|
*/
|
|
180
|
-
getArray(this:
|
|
175
|
+
getArray(this: ConformsTo<this, T, unknown[]>): AstValue<ArrayValueType<T>, TExpression>[];
|
|
181
176
|
/**
|
|
182
177
|
* Is this value a function expression?
|
|
183
178
|
*/
|
|
@@ -186,7 +181,7 @@ export declare class AstValue<T, TExpression> {
|
|
|
186
181
|
* Extract the return value as an `AstValue` from this value as a function expression, or error if
|
|
187
182
|
* it is not a function expression.
|
|
188
183
|
*/
|
|
189
|
-
getFunctionReturnValue<R>(this:
|
|
184
|
+
getFunctionReturnValue<R>(this: ConformsTo<this, T, Function>): AstValue<R, TExpression>;
|
|
190
185
|
isCallExpression(): boolean;
|
|
191
186
|
getCallee(): AstValue<unknown, TExpression>;
|
|
192
187
|
getArguments(): AstValue<unknown, TExpression>[];
|
|
@@ -11,7 +11,7 @@ import { SourceFile, SourceFileLoader } from '../../../src/ngtsc/sourcemaps';
|
|
|
11
11
|
/**
|
|
12
12
|
* A function that will return a `SourceFile` object (or null) for the current file being linked.
|
|
13
13
|
*/
|
|
14
|
-
export
|
|
14
|
+
export type GetSourceFileFn = () => SourceFile | null;
|
|
15
15
|
/**
|
|
16
16
|
* Create a `GetSourceFileFn` that will return the `SourceFile` being linked or `null`, if not
|
|
17
17
|
* available.
|
|
@@ -34,7 +34,7 @@ export interface ModuleWithProvidersInfo {
|
|
|
34
34
|
*/
|
|
35
35
|
ngModule: Reference<ClassDeclaration>;
|
|
36
36
|
}
|
|
37
|
-
export
|
|
37
|
+
export type ModuleWithProvidersAnalyses = Map<ts.SourceFile, ModuleWithProvidersInfo[]>;
|
|
38
38
|
export declare const ModuleWithProvidersAnalyses: MapConstructor;
|
|
39
39
|
export declare class ModuleWithProvidersAnalyzer {
|
|
40
40
|
private host;
|
|
@@ -15,7 +15,7 @@ export interface ExportInfo {
|
|
|
15
15
|
from: AbsoluteFsPath;
|
|
16
16
|
dtsFrom?: AbsoluteFsPath | null;
|
|
17
17
|
}
|
|
18
|
-
export
|
|
18
|
+
export type PrivateDeclarationsAnalyses = ExportInfo[];
|
|
19
19
|
/**
|
|
20
20
|
* This class will analyze a program to find all the declared classes
|
|
21
21
|
* (i.e. on an NgModule) that are not publicly exported via an entry-point.
|
|
@@ -26,5 +26,5 @@ export interface CompiledFile {
|
|
|
26
26
|
*/
|
|
27
27
|
reexports: Reexport[];
|
|
28
28
|
}
|
|
29
|
-
export
|
|
29
|
+
export type DecorationAnalyses = Map<ts.SourceFile, CompiledFile>;
|
|
30
30
|
export declare const DecorationAnalyses: MapConstructor;
|
|
@@ -55,7 +55,7 @@ export interface DependencyDiagnostics {
|
|
|
55
55
|
*
|
|
56
56
|
* See `DependencyResolver#sortEntryPointsByDependency()`.
|
|
57
57
|
*/
|
|
58
|
-
export
|
|
58
|
+
export type PartiallyOrderedEntryPoints = PartiallyOrderedList<EntryPoint>;
|
|
59
59
|
/**
|
|
60
60
|
* A list of entry-points, sorted by their dependencies, and the dependency graph.
|
|
61
61
|
*
|
|
@@ -108,7 +108,7 @@ export declare class ModuleResolver {
|
|
|
108
108
|
private findPackagePath;
|
|
109
109
|
}
|
|
110
110
|
/** The result of resolving an import to a module. */
|
|
111
|
-
export
|
|
111
|
+
export type ResolvedModule = ResolvedExternalModule | ResolvedRelativeModule | ResolvedDeepImport;
|
|
112
112
|
/**
|
|
113
113
|
* A module that is external to the package doing the importing.
|
|
114
114
|
* In this case we capture the folder containing the entry-point.
|
|
@@ -14,11 +14,11 @@ import { Task, TaskCompletedCallback, TaskQueue } from './tasks/api';
|
|
|
14
14
|
* @return A list of tasks that need to be executed in order to process the necessary format
|
|
15
15
|
* properties for all entry-points.
|
|
16
16
|
*/
|
|
17
|
-
export
|
|
17
|
+
export type AnalyzeEntryPointsFn = () => TaskQueue;
|
|
18
18
|
/** The type of the function that can process/compile a task. */
|
|
19
|
-
export
|
|
19
|
+
export type CompileFn<T> = (task: Task) => void | T;
|
|
20
20
|
/** The type of the function that creates the `CompileFn` function used to process tasks. */
|
|
21
|
-
export
|
|
21
|
+
export type CreateCompileFn = <T extends void | Promise<void>>(beforeWritingFiles: (transformedFiles: FileToWrite[]) => T, onTaskCompleted: TaskCompletedCallback) => CompileFn<T>;
|
|
22
22
|
/**
|
|
23
23
|
* A class that orchestrates and executes the required work (i.e. analyzes the entry-points,
|
|
24
24
|
* processes the resulting tasks, does book-keeping and validates the final outcome).
|
|
@@ -47,6 +47,6 @@ export interface UpdatePackageJsonMessage extends JsonObject {
|
|
|
47
47
|
changes: PackageJsonChange[];
|
|
48
48
|
}
|
|
49
49
|
/** The type of messages sent from cluster workers to the cluster master. */
|
|
50
|
-
export
|
|
50
|
+
export type MessageFromWorker = ReadyMessage | ErrorMessage | TaskCompletedMessage | TransformedFilesMessage | UpdatePackageJsonMessage;
|
|
51
51
|
/** The type of messages sent from the cluster master to cluster workers. */
|
|
52
|
-
export
|
|
52
|
+
export type MessageToWorker = ProcessTaskMessage;
|
|
@@ -66,20 +66,20 @@ export declare enum DtsProcessing {
|
|
|
66
66
|
*
|
|
67
67
|
* See `DependencyResolver#sortEntryPointsByDependency()`.
|
|
68
68
|
*/
|
|
69
|
-
export
|
|
69
|
+
export type PartiallyOrderedTasks = PartiallyOrderedList<Task>;
|
|
70
70
|
/**
|
|
71
71
|
* A mapping from Tasks to the Tasks that depend upon them (dependents).
|
|
72
72
|
*/
|
|
73
|
-
export
|
|
73
|
+
export type TaskDependencies = Map<Task, Set<Task>>;
|
|
74
74
|
export declare const TaskDependencies: MapConstructor;
|
|
75
75
|
/**
|
|
76
76
|
* A function to create a TaskCompletedCallback function.
|
|
77
77
|
*/
|
|
78
|
-
export
|
|
78
|
+
export type CreateTaskCompletedCallback = (taskQueue: TaskQueue) => TaskCompletedCallback;
|
|
79
79
|
/**
|
|
80
80
|
* A function to be called once a task has been processed.
|
|
81
81
|
*/
|
|
82
|
-
export
|
|
82
|
+
export type TaskCompletedCallback = (task: Task, outcome: TaskProcessingOutcome, message: string | null) => void;
|
|
83
83
|
/**
|
|
84
84
|
* Represents the outcome of processing a `Task`.
|
|
85
85
|
*/
|
|
@@ -16,7 +16,7 @@ import { Task, TaskCompletedCallback, TaskProcessingOutcome, TaskQueue } from '.
|
|
|
16
16
|
* These functions can be composed using the `composeTaskCompletedCallbacks()`
|
|
17
17
|
* to create a `TaskCompletedCallback` function that can be passed to an `Executor`.
|
|
18
18
|
*/
|
|
19
|
-
export
|
|
19
|
+
export type TaskCompletedHandler = (task: Task, message: string | null) => void;
|
|
20
20
|
/**
|
|
21
21
|
* Compose a group of TaskCompletedHandlers into a single TaskCompletedCallback.
|
|
22
22
|
*
|
|
@@ -723,10 +723,10 @@ export declare class Esm2015ReflectionHost extends TypeScriptReflectionHost impl
|
|
|
723
723
|
/**
|
|
724
724
|
* An enum member assignment that looks like `Enum[X] = Y;`.
|
|
725
725
|
*/
|
|
726
|
-
export
|
|
726
|
+
export type EnumMemberAssignment = ts.BinaryExpression & {
|
|
727
727
|
left: ts.ElementAccessExpression;
|
|
728
728
|
};
|
|
729
|
-
export
|
|
729
|
+
export type ParamInfo = {
|
|
730
730
|
decorators: Decorator[] | null;
|
|
731
731
|
typeExpression: ts.Expression | null;
|
|
732
732
|
};
|
|
@@ -768,7 +768,7 @@ export interface DecoratorCall {
|
|
|
768
768
|
* ], SomeDirective);
|
|
769
769
|
* ```
|
|
770
770
|
*/
|
|
771
|
-
export
|
|
771
|
+
export type DecorateHelperEntry = ParameterTypes | ParameterDecorators | DecoratorCall;
|
|
772
772
|
/**
|
|
773
773
|
* The recorded decorator information of a single class. This information is cached in the host.
|
|
774
774
|
*/
|
|
@@ -792,7 +792,7 @@ interface DecoratorInfo {
|
|
|
792
792
|
/**
|
|
793
793
|
* A statement node that represents an assignment.
|
|
794
794
|
*/
|
|
795
|
-
export
|
|
795
|
+
export type AssignmentStatement = ts.ExpressionStatement & {
|
|
796
796
|
expression: {
|
|
797
797
|
left: ts.Identifier;
|
|
798
798
|
right: ts.Expression;
|
|
@@ -856,7 +856,7 @@ export declare function isMemberDecorateCall(call: ts.CallExpression, matches: (
|
|
|
856
856
|
* which is actually the symbol of the identifier of the property.
|
|
857
857
|
*/
|
|
858
858
|
export declare function getPropertyValueFromSymbol(propSymbol: ts.Symbol): ts.Expression | undefined;
|
|
859
|
-
|
|
859
|
+
type InitializedVariableClassDeclaration = ClassDeclaration<ts.VariableDeclaration> & {
|
|
860
860
|
initializer: ts.Expression;
|
|
861
861
|
};
|
|
862
862
|
/**
|
|
@@ -13,7 +13,7 @@ import { SymbolWithValueDeclaration } from '../../../src/ngtsc/util/src/typescri
|
|
|
13
13
|
* The symbol corresponding to a "class" declaration. I.e. a `ts.Symbol` whose `valueDeclaration` is
|
|
14
14
|
* a `ClassDeclaration`.
|
|
15
15
|
*/
|
|
16
|
-
export
|
|
16
|
+
export type ClassSymbol = ts.Symbol & {
|
|
17
17
|
valueDeclaration: ClassDeclaration;
|
|
18
18
|
};
|
|
19
19
|
/**
|
|
@@ -122,17 +122,17 @@ export interface SyncNgccOptions {
|
|
|
122
122
|
/**
|
|
123
123
|
* The options to configure the ngcc compiler for asynchronous execution.
|
|
124
124
|
*/
|
|
125
|
-
export
|
|
125
|
+
export type AsyncNgccOptions = Omit<SyncNgccOptions, 'async'> & {
|
|
126
126
|
async: true;
|
|
127
127
|
};
|
|
128
128
|
/**
|
|
129
129
|
* The options to configure the ngcc compiler.
|
|
130
130
|
*/
|
|
131
|
-
export
|
|
132
|
-
export
|
|
133
|
-
export
|
|
134
|
-
export
|
|
135
|
-
export
|
|
131
|
+
export type NgccOptions = AsyncNgccOptions | SyncNgccOptions;
|
|
132
|
+
export type OptionalNgccOptionKeys = 'targetEntryPointPath' | 'tsConfigPath' | 'pathMappings' | 'findEntryPointsFromTsConfigProgram';
|
|
133
|
+
export type RequiredNgccOptions = Required<Omit<NgccOptions, OptionalNgccOptionKeys>>;
|
|
134
|
+
export type OptionalNgccOptions = Pick<NgccOptions, OptionalNgccOptionKeys>;
|
|
135
|
+
export type SharedSetup = {
|
|
136
136
|
fileSystem: FileSystem;
|
|
137
137
|
absBasePath: AbsoluteFsPath;
|
|
138
138
|
projectPath: AbsoluteFsPath;
|
|
@@ -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 = "15.1.0-next.
|
|
12
|
+
export declare const NGCC_VERSION = "15.1.0-next.2";
|
|
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.
|
|
@@ -6,7 +6,7 @@ import { NgccConfiguration } from './configuration';
|
|
|
6
6
|
/**
|
|
7
7
|
* The possible values for the format of an entry-point.
|
|
8
8
|
*/
|
|
9
|
-
export
|
|
9
|
+
export type EntryPointFormat = 'esm5' | 'esm2015' | 'umd' | 'commonjs';
|
|
10
10
|
/**
|
|
11
11
|
* An object containing information about an entry-point, including paths
|
|
12
12
|
* to each of the possible entry-point formats.
|
|
@@ -48,7 +48,7 @@ export interface PackageJsonFormatPropertiesMap {
|
|
|
48
48
|
types?: string;
|
|
49
49
|
typings?: string;
|
|
50
50
|
}
|
|
51
|
-
export
|
|
51
|
+
export type PackageJsonFormatProperties = keyof PackageJsonFormatPropertiesMap;
|
|
52
52
|
/**
|
|
53
53
|
* The properties that may be loaded from the `package.json` file.
|
|
54
54
|
*/
|
|
@@ -61,7 +61,7 @@ export interface EntryPointPackageJson extends JsonObject, PackageJsonFormatProp
|
|
|
61
61
|
};
|
|
62
62
|
__processed_by_ivy_ngcc__?: Record<string, string>;
|
|
63
63
|
}
|
|
64
|
-
export
|
|
64
|
+
export type EntryPointJsonProperty = Exclude<PackageJsonFormatProperties, 'types' | 'typings'>;
|
|
65
65
|
export declare const SUPPORTED_FORMAT_PROPERTIES: EntryPointJsonProperty[];
|
|
66
66
|
/**
|
|
67
67
|
* The path does not represent an entry-point, i.e. there is no package.json at the path and there
|
|
@@ -85,7 +85,7 @@ export declare const INCOMPATIBLE_ENTRY_POINT = "incompatible-entry-point";
|
|
|
85
85
|
* * INCOMPATIBLE_ENTRY_POINT - the path was a non-processable entry-point that should be searched
|
|
86
86
|
* for sub-entry-points
|
|
87
87
|
*/
|
|
88
|
-
export
|
|
88
|
+
export type GetEntryPointResult = EntryPoint | typeof IGNORED_ENTRY_POINT | typeof INCOMPATIBLE_ENTRY_POINT | typeof NO_ENTRY_POINT;
|
|
89
89
|
/**
|
|
90
90
|
* Try to create an entry-point from the given paths and properties.
|
|
91
91
|
*
|
|
@@ -58,7 +58,7 @@ export declare class EntryPointManifest {
|
|
|
58
58
|
export declare class InvalidatingEntryPointManifest extends EntryPointManifest {
|
|
59
59
|
readEntryPointsUsingManifest(_basePath: AbsoluteFsPath): EntryPointWithDependencies[] | null;
|
|
60
60
|
}
|
|
61
|
-
export
|
|
61
|
+
export type EntryPointPaths = [
|
|
62
62
|
string,
|
|
63
63
|
string,
|
|
64
64
|
Array<AbsoluteFsPath>?,
|
|
@@ -75,6 +75,6 @@ export interface EntryPointManifestFile {
|
|
|
75
75
|
entryPointPaths: EntryPointPaths[];
|
|
76
76
|
}
|
|
77
77
|
/** The JSON format of the entrypoint properties. */
|
|
78
|
-
export
|
|
78
|
+
export type NewEntryPointPropertiesMap = {
|
|
79
79
|
[Property in PackageJsonFormatProperties as `${Property}_ivy_ngcc`]?: string;
|
|
80
80
|
};
|
|
@@ -17,7 +17,7 @@ import { NgccReflectionHost } from '../host/ngcc_host';
|
|
|
17
17
|
import { RenderingFormatter } from '../rendering/rendering_formatter';
|
|
18
18
|
import { FileToWrite } from '../rendering/utils';
|
|
19
19
|
import { EntryPointBundle } from './entry_point_bundle';
|
|
20
|
-
export
|
|
20
|
+
export type TransformResult = {
|
|
21
21
|
success: true;
|
|
22
22
|
diagnostics: ts.Diagnostic[];
|
|
23
23
|
transformedFiles: FileToWrite[];
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import { AbsoluteFsPath, PathManipulation } from '../../src/ngtsc/file_system';
|
|
10
10
|
import { ParsedConfiguration } from '../../src/perform_compile';
|
|
11
|
-
export
|
|
11
|
+
export type PathMappings = {
|
|
12
12
|
baseUrl: string;
|
|
13
13
|
paths: {
|
|
14
14
|
[key: string]: string[];
|
|
@@ -19,7 +19,7 @@ import { CompiledClass } from '../analysis/types';
|
|
|
19
19
|
* of Ivy static fields. The map is keyed by the container node, such that we
|
|
20
20
|
* can tell if we should remove the entire decorator property
|
|
21
21
|
*/
|
|
22
|
-
export
|
|
22
|
+
export type RedundantDecoratorMap = Map<ts.Node, ts.Node[]>;
|
|
23
23
|
export declare const RedundantDecoratorMap: MapConstructor;
|
|
24
24
|
/**
|
|
25
25
|
* Implement this interface with methods that know how to render a specific format,
|
package/ngcc/src/utils.d.ts
CHANGED
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
import ts from 'typescript';
|
|
10
10
|
import { AbsoluteFsPath, ReadonlyFileSystem } from '../../src/ngtsc/file_system';
|
|
11
11
|
import { DeclarationNode, KnownDeclaration } from '../../src/ngtsc/reflection';
|
|
12
|
-
export
|
|
13
|
-
export
|
|
12
|
+
export type JsonPrimitive = string | number | boolean | null;
|
|
13
|
+
export type JsonValue = JsonPrimitive | JsonArray | JsonObject | undefined;
|
|
14
14
|
export interface JsonArray extends Array<JsonValue> {
|
|
15
15
|
}
|
|
16
16
|
export interface JsonObject {
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
/// <amd-module name="@angular/compiler-cli/ngcc/src/writing/package_json_updater" />
|
|
9
9
|
import { AbsoluteFsPath, FileSystem } from '../../../src/ngtsc/file_system';
|
|
10
10
|
import { JsonObject, JsonValue } from '../utils';
|
|
11
|
-
export
|
|
12
|
-
export
|
|
11
|
+
export type PackageJsonChange = [string[], JsonValue, PackageJsonPropertyPositioning];
|
|
12
|
+
export type PackageJsonPropertyPositioning = 'unimportant' | 'alphabetic' | {
|
|
13
13
|
before: string;
|
|
14
14
|
};
|
|
15
|
-
export
|
|
15
|
+
export type WritePackageJsonChangesFn = (changes: PackageJsonChange[], packageJsonPath: AbsoluteFsPath, parsedJson?: JsonObject) => void;
|
|
16
16
|
/**
|
|
17
17
|
* A utility object that can be used to safely update values in a `package.json` file.
|
|
18
18
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/compiler-cli",
|
|
3
|
-
"version": "15.1.0-next.
|
|
3
|
+
"version": "15.1.0-next.2",
|
|
4
4
|
"description": "Angular - the compiler CLI for Node.js",
|
|
5
5
|
"typings": "index.d.ts",
|
|
6
6
|
"bin": {
|
|
@@ -58,15 +58,15 @@
|
|
|
58
58
|
"chokidar": "^3.0.0",
|
|
59
59
|
"convert-source-map": "^1.5.1",
|
|
60
60
|
"dependency-graph": "^0.11.0",
|
|
61
|
-
"magic-string": "^0.
|
|
61
|
+
"magic-string": "^0.27.0",
|
|
62
62
|
"semver": "^7.0.0",
|
|
63
63
|
"sourcemap-codec": "^1.4.8",
|
|
64
64
|
"tslib": "^2.3.0",
|
|
65
65
|
"yargs": "^17.2.1"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
68
|
-
"@angular/compiler": "15.1.0-next.
|
|
69
|
-
"typescript": ">=4.8.2 <
|
|
68
|
+
"@angular/compiler": "15.1.0-next.2",
|
|
69
|
+
"typescript": ">=4.8.2 <5.0"
|
|
70
70
|
},
|
|
71
71
|
"repository": {
|
|
72
72
|
"type": "git",
|
package/src/main.d.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
import ts from 'typescript';
|
|
10
10
|
import { ParsedConfiguration } from './perform_compile';
|
|
11
11
|
import * as api from './transformers/api';
|
|
12
|
-
|
|
12
|
+
type TsickleModule = typeof import('tsickle');
|
|
13
13
|
export declare function main(args: string[], consoleError?: (s: string) => void, config?: NgcParsedConfiguration, customTransformers?: api.CustomTransformers, programReuse?: {
|
|
14
14
|
program: api.Program | undefined;
|
|
15
15
|
}, modifiedResourceFiles?: Set<string> | null, tsickle?: TsickleModule): number;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
/// <amd-module name="@angular/compiler-cli/src/ngtsc/annotations/common/src/di" />
|
|
9
9
|
import { R3DependencyMetadata } from '@angular/compiler';
|
|
10
10
|
import { ClassDeclaration, CtorParameter, ReflectionHost, UnavailableValue } from '../../../reflection';
|
|
11
|
-
export
|
|
11
|
+
export type ConstructorDeps = {
|
|
12
12
|
deps: R3DependencyMetadata[];
|
|
13
13
|
} | {
|
|
14
14
|
deps: null;
|
|
@@ -8,6 +8,6 @@
|
|
|
8
8
|
/// <amd-module name="@angular/compiler-cli/src/ngtsc/annotations/common/src/factory" />
|
|
9
9
|
import { R3FactoryMetadata } from '@angular/compiler';
|
|
10
10
|
import { CompileResult } from '../../../transform';
|
|
11
|
-
export
|
|
11
|
+
export type CompileFactoryFn = (metadata: R3FactoryMetadata) => CompileResult;
|
|
12
12
|
export declare function compileNgFactoryDefField(metadata: R3FactoryMetadata): CompileResult;
|
|
13
13
|
export declare function compileDeclareFactory(metadata: R3FactoryMetadata): CompileResult;
|
|
@@ -19,7 +19,7 @@ import { ParsedTemplateWithSource, StyleUrlMeta } from './resources';
|
|
|
19
19
|
* The `keyof R3ComponentMetadata &` condition ensures that only fields of `R3ComponentMetadata` can
|
|
20
20
|
* be included here.
|
|
21
21
|
*/
|
|
22
|
-
export
|
|
22
|
+
export type ComponentMetadataResolvedFields = SubsetOfKeys<R3ComponentMetadata<R3TemplateDependencyMetadata>, 'declarations' | 'declarationListEmitMode'>;
|
|
23
23
|
export interface ComponentAnalysisData {
|
|
24
24
|
/**
|
|
25
25
|
* `meta` includes those fields of `R3ComponentMetadata` which are calculated at `analyze` time
|
|
@@ -62,4 +62,4 @@ export interface ComponentAnalysisData {
|
|
|
62
62
|
/** Raw expression that defined the host directives array. Used for diagnostics. */
|
|
63
63
|
rawHostDirectives: ts.Expression | null;
|
|
64
64
|
}
|
|
65
|
-
export
|
|
65
|
+
export type ComponentResolutionData = Pick<R3ComponentMetadata<R3TemplateDependencyMetadata>, ComponentMetadataResolvedFields>;
|
|
@@ -92,7 +92,7 @@ export interface ExternalTemplateDeclaration extends CommonTemplateDeclaration {
|
|
|
92
92
|
* information, `ComponentDecoratorHandler` is able to re-read the template and update the component
|
|
93
93
|
* record without needing to parse the original decorator again.
|
|
94
94
|
*/
|
|
95
|
-
export
|
|
95
|
+
export type TemplateDeclaration = InlineTemplateDeclaration | ExternalTemplateDeclaration;
|
|
96
96
|
/** Determines the node to use for debugging purposes for the given TemplateDeclaration. */
|
|
97
97
|
export declare function getTemplateDeclarationNodeForError(declaration: TemplateDeclaration): ts.Node;
|
|
98
98
|
export interface ExtractTemplateOptions {
|
|
@@ -14,7 +14,7 @@ import { ExtendedTsCompilerHost, UnifiedModulesHost } from './interfaces';
|
|
|
14
14
|
* Names of methods from `ExtendedTsCompilerHost` that need to be provided by the
|
|
15
15
|
* `NgCompilerAdapter`.
|
|
16
16
|
*/
|
|
17
|
-
export
|
|
17
|
+
export type ExtendedCompilerHostMethods = 'getCanonicalFileName' | 'resolveModuleNames' | 'getCurrentDirectory' | 'getModifiedResourceFiles' | 'readResource' | 'resourceNameToFileName' | 'transformResource';
|
|
18
18
|
/**
|
|
19
19
|
* Adapter for `NgCompiler` that allows it to be used in various circumstances, such as
|
|
20
20
|
* command-line `ngc`, as a plugin to `ts_library` in Bazel, or from the Language Service.
|
|
@@ -65,7 +65,7 @@ export interface IncrementalResourceCompilationTicket {
|
|
|
65
65
|
* Angular compiler. They abstract the starting state of compilation and allow `NgCompiler` to be
|
|
66
66
|
* managed independently of any incremental compilation lifecycle.
|
|
67
67
|
*/
|
|
68
|
-
export
|
|
68
|
+
export type CompilationTicket = FreshCompilationTicket | IncrementalTypeScriptCompilationTicket | IncrementalResourceCompilationTicket;
|
|
69
69
|
/**
|
|
70
70
|
* Create a `CompilationTicket` for a brand new compilation, using no prior state.
|
|
71
71
|
*/
|
|
@@ -49,7 +49,7 @@ export declare class DelegatingCompilerHost implements Omit<RequiredDelegations<
|
|
|
49
49
|
useCaseSensitiveFileNames: () => boolean;
|
|
50
50
|
writeFile: ts.WriteFileCallback;
|
|
51
51
|
getModuleResolutionCache: (() => ts.ModuleResolutionCache | undefined) | undefined;
|
|
52
|
-
hasInvalidatedResolutions: ((
|
|
52
|
+
hasInvalidatedResolutions: ((filePath: ts.Path) => boolean) | undefined;
|
|
53
53
|
}
|
|
54
54
|
/**
|
|
55
55
|
* A wrapper around `ts.CompilerHost` (plus any extension methods from `ExtendedTsCompilerHost`).
|
|
@@ -14,7 +14,7 @@ import { AbsoluteFsPath, BrandedPath, PathSegment } from './types';
|
|
|
14
14
|
*
|
|
15
15
|
* Paths in the type system use POSIX format.
|
|
16
16
|
*/
|
|
17
|
-
export
|
|
17
|
+
export type LogicalProjectPath = BrandedPath<'LogicalProjectPath'>;
|
|
18
18
|
export declare const LogicalProjectPath: {
|
|
19
19
|
/**
|
|
20
20
|
* Get the relative path between two `LogicalProjectPath`s.
|
|
@@ -12,19 +12,19 @@
|
|
|
12
12
|
* A `string` is not assignable to a `BrandedPath`, but a `BrandedPath` is assignable to a `string`.
|
|
13
13
|
* Two `BrandedPath`s with different brands are not mutually assignable.
|
|
14
14
|
*/
|
|
15
|
-
export
|
|
15
|
+
export type BrandedPath<B extends string> = string & {
|
|
16
16
|
_brand: B;
|
|
17
17
|
};
|
|
18
18
|
/**
|
|
19
19
|
* A fully qualified path in the file system, in POSIX form.
|
|
20
20
|
*/
|
|
21
|
-
export
|
|
21
|
+
export type AbsoluteFsPath = BrandedPath<'AbsoluteFsPath'>;
|
|
22
22
|
/**
|
|
23
23
|
* A path that's relative to another (unspecified) root.
|
|
24
24
|
*
|
|
25
25
|
* This does not necessarily have to refer to a physical file.
|
|
26
26
|
*/
|
|
27
|
-
export
|
|
27
|
+
export type PathSegment = BrandedPath<'PathSegment'>;
|
|
28
28
|
/**
|
|
29
29
|
* An abstraction over the path manipulation aspects of a file-system.
|
|
30
30
|
*/
|
|
@@ -78,7 +78,7 @@ export interface FileSystem extends ReadonlyFileSystem {
|
|
|
78
78
|
ensureDir(path: AbsoluteFsPath): void;
|
|
79
79
|
removeDeep(path: AbsoluteFsPath): void;
|
|
80
80
|
}
|
|
81
|
-
export
|
|
81
|
+
export type PathString = string | AbsoluteFsPath | PathSegment;
|
|
82
82
|
/**
|
|
83
83
|
* Information about an object in the FileSystem.
|
|
84
84
|
* This is analogous to the `fs.Stats` class in Node.js.
|
|
@@ -63,7 +63,7 @@ export declare enum ImportFlags {
|
|
|
63
63
|
* source file, then `'unknown'` should be returned. If the generated expression does not represent
|
|
64
64
|
* an import then `null` should be used.
|
|
65
65
|
*/
|
|
66
|
-
export
|
|
66
|
+
export type ImportedFile = ts.SourceFile | 'unknown' | null;
|
|
67
67
|
export declare const enum ReferenceEmitKind {
|
|
68
68
|
Success = 0,
|
|
69
69
|
Failed = 1
|
|
@@ -104,7 +104,7 @@ export interface FailedEmitResult {
|
|
|
104
104
|
*/
|
|
105
105
|
reason: string;
|
|
106
106
|
}
|
|
107
|
-
export
|
|
107
|
+
export type ReferenceEmitResult = EmittedReference | FailedEmitResult;
|
|
108
108
|
/**
|
|
109
109
|
* Verifies that a reference was emitted successfully, or raises a `FatalDiagnosticError` otherwise.
|
|
110
110
|
* @param result The emit result that should have been successful.
|
|
@@ -95,4 +95,4 @@ export interface DeltaIncrementalState {
|
|
|
95
95
|
*
|
|
96
96
|
* Discriminated by the `IncrementalStateKind` enum.
|
|
97
97
|
*/
|
|
98
|
-
export
|
|
98
|
+
export type IncrementalState = AnalyzedIncrementalState | DeltaIncrementalState | FreshIncrementalState;
|