@angular/core 16.2.0-next.3 → 16.2.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/rxjs-interop/src/to_signal.mjs +1 -1
- package/esm2022/src/core.mjs +2 -1
- package/esm2022/src/core_private_export.mjs +2 -1
- package/esm2022/src/core_render3_private_export.mjs +3 -2
- package/esm2022/src/di/contextual.mjs +7 -1
- package/esm2022/src/di/create_injector.mjs +1 -3
- package/esm2022/src/di/injector.mjs +1 -1
- package/esm2022/src/di/injector_compatibility.mjs +5 -2
- package/esm2022/src/di/interface/provider.mjs +1 -1
- package/esm2022/src/di/provider_collection.mjs +17 -16
- package/esm2022/src/di/r3_injector.mjs +37 -2
- package/esm2022/src/errors.mjs +1 -1
- package/esm2022/src/hydration/api.mjs +7 -14
- package/esm2022/src/linker/view_container_ref.mjs +2 -2
- package/esm2022/src/metadata/di.mjs +5 -5
- package/esm2022/src/metadata/directives.mjs +1 -1
- package/esm2022/src/render3/after_render_hooks.mjs +210 -0
- package/esm2022/src/render3/component_ref.mjs +5 -9
- package/esm2022/src/render3/debug/framework_injector_profiler.mjs +212 -0
- package/esm2022/src/render3/debug/injector_profiler.mjs +103 -0
- package/esm2022/src/render3/di.mjs +32 -2
- package/esm2022/src/render3/di_setup.mjs +11 -4
- package/esm2022/src/render3/hooks.mjs +3 -3
- package/esm2022/src/render3/index.mjs +2 -2
- package/esm2022/src/render3/instructions/all.mjs +2 -1
- package/esm2022/src/render3/instructions/change_detection.mjs +16 -9
- package/esm2022/src/render3/instructions/defer.mjs +19 -0
- package/esm2022/src/render3/instructions/di.mjs +5 -2
- package/esm2022/src/render3/interfaces/view.mjs +1 -1
- package/esm2022/src/render3/jit/environment.mjs +2 -1
- package/esm2022/src/render3/pipe.mjs +12 -3
- package/esm2022/src/render3/util/global_utils.mjs +7 -1
- package/esm2022/src/render3/util/injector_discovery_utils.mjs +460 -0
- package/esm2022/src/render3/util/misc_utils.mjs +12 -1
- package/esm2022/src/util/coercion.mjs +11 -1
- package/esm2022/src/version.mjs +1 -1
- package/esm2022/testing/src/logger.mjs +3 -3
- package/fesm2022/core.mjs +1501 -453
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/rxjs-interop.mjs +1 -1
- package/fesm2022/rxjs-interop.mjs.map +1 -1
- package/fesm2022/testing.mjs +3938 -3537
- package/fesm2022/testing.mjs.map +1 -1
- package/index.d.ts +215 -18
- package/package.json +1 -1
- package/rxjs-interop/index.d.ts +17 -15
- package/schematics/migrations/guard-and-resolve-interfaces/bundle.js +13 -13
- package/schematics/migrations/remove-module-id/bundle.js +14 -14
- package/schematics/ng-generate/standalone-migration/bundle.js +3628 -2718
- package/schematics/ng-generate/standalone-migration/bundle.js.map +4 -4
- package/testing/index.d.ts +1 -1
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v16.2.0-
|
|
2
|
+
* @license Angular v16.2.0-rc.0
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -77,6 +77,129 @@ export declare interface AfterContentInit {
|
|
|
77
77
|
ngAfterContentInit(): void;
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
+
/**
|
|
81
|
+
* Register a callback to be invoked the next time the application
|
|
82
|
+
* finishes rendering.
|
|
83
|
+
*
|
|
84
|
+
* Note that the callback will run
|
|
85
|
+
* - in the order it was registered
|
|
86
|
+
* - on browser platforms only
|
|
87
|
+
*
|
|
88
|
+
* <div class="alert is-important">
|
|
89
|
+
*
|
|
90
|
+
* Components are not guaranteed to be [hydrated](guide/hydration) before the callback runs.
|
|
91
|
+
* You must use caution when directly reading or writing the DOM and layout.
|
|
92
|
+
*
|
|
93
|
+
* </div>
|
|
94
|
+
*
|
|
95
|
+
* @param callback A callback function to register
|
|
96
|
+
*
|
|
97
|
+
* @usageNotes
|
|
98
|
+
*
|
|
99
|
+
* Use `afterNextRender` to read or write the DOM once,
|
|
100
|
+
* for example to initialize a non-Angular library.
|
|
101
|
+
*
|
|
102
|
+
* ### Example
|
|
103
|
+
* ```ts
|
|
104
|
+
* @Component({
|
|
105
|
+
* selector: 'my-chart-cmp',
|
|
106
|
+
* template: `<div #chart>{{ ... }}</div>`,
|
|
107
|
+
* })
|
|
108
|
+
* export class MyChartCmp {
|
|
109
|
+
* @ViewChild('chart') chartRef: ElementRef;
|
|
110
|
+
* chart: MyChart|null;
|
|
111
|
+
*
|
|
112
|
+
* constructor() {
|
|
113
|
+
* afterNextRender(() => {
|
|
114
|
+
* this.chart = new MyChart(this.chartRef.nativeElement);
|
|
115
|
+
* });
|
|
116
|
+
* }
|
|
117
|
+
* }
|
|
118
|
+
* ```
|
|
119
|
+
*
|
|
120
|
+
* @developerPreview
|
|
121
|
+
*/
|
|
122
|
+
export declare function afterNextRender(callback: VoidFunction, options?: AfterRenderOptions): AfterRenderRef;
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Register a callback to be invoked each time the application
|
|
126
|
+
* finishes rendering.
|
|
127
|
+
*
|
|
128
|
+
* Note that the callback will run
|
|
129
|
+
* - in the order it was registered
|
|
130
|
+
* - once per render
|
|
131
|
+
* - on browser platforms only
|
|
132
|
+
*
|
|
133
|
+
* <div class="alert is-important">
|
|
134
|
+
*
|
|
135
|
+
* Components are not guaranteed to be [hydrated](guide/hydration) before the callback runs.
|
|
136
|
+
* You must use caution when directly reading or writing the DOM and layout.
|
|
137
|
+
*
|
|
138
|
+
* </div>
|
|
139
|
+
*
|
|
140
|
+
* @param callback A callback function to register
|
|
141
|
+
*
|
|
142
|
+
* @usageNotes
|
|
143
|
+
*
|
|
144
|
+
* Use `afterRender` to read or write the DOM after each render.
|
|
145
|
+
*
|
|
146
|
+
* ### Example
|
|
147
|
+
* ```ts
|
|
148
|
+
* @Component({
|
|
149
|
+
* selector: 'my-cmp',
|
|
150
|
+
* template: `<span #content>{{ ... }}</span>`,
|
|
151
|
+
* })
|
|
152
|
+
* export class MyComponent {
|
|
153
|
+
* @ViewChild('content') contentRef: ElementRef;
|
|
154
|
+
*
|
|
155
|
+
* constructor() {
|
|
156
|
+
* afterRender(() => {
|
|
157
|
+
* console.log('content height: ' + this.contentRef.nativeElement.scrollHeight);
|
|
158
|
+
* });
|
|
159
|
+
* }
|
|
160
|
+
* }
|
|
161
|
+
* ```
|
|
162
|
+
*
|
|
163
|
+
* @developerPreview
|
|
164
|
+
*/
|
|
165
|
+
export declare function afterRender(callback: VoidFunction, options?: AfterRenderOptions): AfterRenderRef;
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* A wrapper around a function to be used as an after render callback.
|
|
169
|
+
* @private
|
|
170
|
+
*/
|
|
171
|
+
declare class AfterRenderCallback {
|
|
172
|
+
private callback;
|
|
173
|
+
constructor(callback: VoidFunction);
|
|
174
|
+
invoke(): void;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* Options passed to `afterRender` and `afterNextRender`.
|
|
179
|
+
*
|
|
180
|
+
* @developerPreview
|
|
181
|
+
*/
|
|
182
|
+
export declare interface AfterRenderOptions {
|
|
183
|
+
/**
|
|
184
|
+
* The `Injector` to use during creation.
|
|
185
|
+
*
|
|
186
|
+
* If this is not provided, the current injection context will be used instead (via `inject`).
|
|
187
|
+
*/
|
|
188
|
+
injector?: Injector;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* A callback that runs after render.
|
|
193
|
+
*
|
|
194
|
+
* @developerPreview
|
|
195
|
+
*/
|
|
196
|
+
export declare interface AfterRenderRef {
|
|
197
|
+
/**
|
|
198
|
+
* Shut down the callback, preventing it from being called again.
|
|
199
|
+
*/
|
|
200
|
+
destroy(): void;
|
|
201
|
+
}
|
|
202
|
+
|
|
80
203
|
/**
|
|
81
204
|
* @description
|
|
82
205
|
* A lifecycle hook that is called after the default change detector has
|
|
@@ -617,6 +740,11 @@ export declare interface AttributeDecorator {
|
|
|
617
740
|
/**
|
|
618
741
|
* Transforms a value (typically a string) to a boolean.
|
|
619
742
|
* Intended to be used as a transform function of an input.
|
|
743
|
+
*
|
|
744
|
+
* @usageNotes
|
|
745
|
+
* ```typescript
|
|
746
|
+
* @Input({ transform: booleanAttribute }) status!: boolean;
|
|
747
|
+
* ```
|
|
620
748
|
* @param value Value to be transformed.
|
|
621
749
|
*
|
|
622
750
|
* @publicApi
|
|
@@ -1685,7 +1813,7 @@ export declare const ContentChildren: ContentChildrenDecorator;
|
|
|
1685
1813
|
/**
|
|
1686
1814
|
* Type of the ContentChildren decorator / constructor function.
|
|
1687
1815
|
*
|
|
1688
|
-
* @see {@link ContentChildren}
|
|
1816
|
+
* @see {@link ContentChildren}
|
|
1689
1817
|
* @publicApi
|
|
1690
1818
|
*/
|
|
1691
1819
|
export declare interface ContentChildrenDecorator {
|
|
@@ -2264,6 +2392,8 @@ export declare class DefaultIterableDiffer<V> implements IterableDiffer<V>, Iter
|
|
|
2264
2392
|
private _addToRemovals;
|
|
2265
2393
|
}
|
|
2266
2394
|
|
|
2395
|
+
declare type DeferredDepsFn = () => Array<Promise<Type<unknown>> | Type<unknown>>;
|
|
2396
|
+
|
|
2267
2397
|
/**
|
|
2268
2398
|
* @deprecated in v8, delete after v10. This API should be used only by generated code, and that
|
|
2269
2399
|
* code should now use ɵɵdefineInjectable instead.
|
|
@@ -4604,7 +4734,7 @@ export declare abstract class Injector {
|
|
|
4604
4734
|
*
|
|
4605
4735
|
*/
|
|
4606
4736
|
static create(options: {
|
|
4607
|
-
providers: StaticProvider
|
|
4737
|
+
providers: Array<Provider | StaticProvider>;
|
|
4608
4738
|
parent?: Injector;
|
|
4609
4739
|
name?: string;
|
|
4610
4740
|
}): Injector;
|
|
@@ -4690,20 +4820,26 @@ export declare interface InputDecorator {
|
|
|
4690
4820
|
* one of which is given a special binding name.
|
|
4691
4821
|
*
|
|
4692
4822
|
* ```typescript
|
|
4823
|
+
* import { Component, Input, numberAttribute, booleanAttribute } from '@angular/core';
|
|
4693
4824
|
* @Component({
|
|
4694
4825
|
* selector: 'bank-account',
|
|
4695
4826
|
* template: `
|
|
4696
4827
|
* Bank Name: {{bankName}}
|
|
4697
4828
|
* Account Id: {{id}}
|
|
4829
|
+
* Account Status: {{status ? 'Active' : 'InActive'}}
|
|
4698
4830
|
* `
|
|
4699
4831
|
* })
|
|
4700
4832
|
* class BankAccount {
|
|
4701
4833
|
* // This property is bound using its original name.
|
|
4702
|
-
*
|
|
4703
|
-
* // this property
|
|
4834
|
+
* // Defining argument required as true inside the Input Decorator
|
|
4835
|
+
* // makes this property deceleration as mandatory
|
|
4836
|
+
* @Input({ required: true }) bankName!: string;
|
|
4837
|
+
* // Argument alias makes this property value is bound to a different property name
|
|
4704
4838
|
* // when this component is instantiated in a template.
|
|
4705
|
-
*
|
|
4706
|
-
*
|
|
4839
|
+
* // Argument transform convert the input value from string to number
|
|
4840
|
+
* @Input({ alias:'account-id', transform: numberAttribute }) id: number;
|
|
4841
|
+
* // Argument transform the input value from string to boolean
|
|
4842
|
+
* @Input({ transform: booleanAttribute }) status: boolean;
|
|
4707
4843
|
* // this property is not bound, and is not automatically updated by Angular
|
|
4708
4844
|
* normalizedBankName: string;
|
|
4709
4845
|
* }
|
|
@@ -4711,7 +4847,7 @@ export declare interface InputDecorator {
|
|
|
4711
4847
|
* @Component({
|
|
4712
4848
|
* selector: 'app',
|
|
4713
4849
|
* template: `
|
|
4714
|
-
* <bank-account bankName="RBC" account-id="4747"></bank-account>
|
|
4850
|
+
* <bank-account bankName="RBC" account-id="4747" status="true"></bank-account>
|
|
4715
4851
|
* `
|
|
4716
4852
|
* })
|
|
4717
4853
|
* class App {}
|
|
@@ -5495,6 +5631,8 @@ declare interface LViewEnvironment {
|
|
|
5495
5631
|
sanitizer: Sanitizer | null;
|
|
5496
5632
|
/** Container for reactivity system `effect`s. */
|
|
5497
5633
|
effectManager: EffectManager | null;
|
|
5634
|
+
/** Container for after render hooks */
|
|
5635
|
+
afterRenderEventManager: ɵAfterRenderEventManager | null;
|
|
5498
5636
|
}
|
|
5499
5637
|
|
|
5500
5638
|
/** Flags associated with an LView (saved in LView[FLAGS]) */
|
|
@@ -6166,6 +6304,11 @@ declare const NUM_ROOT_NODES = "r";
|
|
|
6166
6304
|
* @param value Value to be transformed.
|
|
6167
6305
|
* @param fallbackValue Value to use if the provided value can't be parsed as a number.
|
|
6168
6306
|
*
|
|
6307
|
+
* @usageNotes
|
|
6308
|
+
* ```typescript
|
|
6309
|
+
* @Input({ transform: numberAttribute }) id!: number;
|
|
6310
|
+
* ```
|
|
6311
|
+
*
|
|
6169
6312
|
* @publicApi
|
|
6170
6313
|
*/
|
|
6171
6314
|
export declare function numberAttribute(value: unknown, fallbackValue?: number): number;
|
|
@@ -6709,10 +6852,10 @@ export declare interface Query {
|
|
|
6709
6852
|
/**
|
|
6710
6853
|
* Base class for query metadata.
|
|
6711
6854
|
*
|
|
6712
|
-
* @see {@link ContentChildren}
|
|
6713
|
-
* @see {@link ContentChild}
|
|
6714
|
-
* @see {@link ViewChildren}
|
|
6715
|
-
* @see {@link ViewChild}
|
|
6855
|
+
* @see {@link ContentChildren}
|
|
6856
|
+
* @see {@link ContentChild}
|
|
6857
|
+
* @see {@link ViewChildren}
|
|
6858
|
+
* @see {@link ViewChild}
|
|
6716
6859
|
*
|
|
6717
6860
|
* @publicApi
|
|
6718
6861
|
*/
|
|
@@ -7626,6 +7769,7 @@ export declare function runInInjectionContext<ReturnT>(injector: Injector, fn: (
|
|
|
7626
7769
|
declare const enum RuntimeErrorCode {
|
|
7627
7770
|
EXPRESSION_CHANGED_AFTER_CHECKED = -100,
|
|
7628
7771
|
RECURSIVE_APPLICATION_REF_TICK = 101,
|
|
7772
|
+
RECURSIVE_APPLICATION_RENDER = 102,
|
|
7629
7773
|
CYCLIC_DI_DEPENDENCY = -200,
|
|
7630
7774
|
PROVIDER_NOT_FOUND = -201,
|
|
7631
7775
|
INVALID_FACTORY_DEPENDENCY = 202,
|
|
@@ -8062,7 +8206,7 @@ export declare interface StaticClassSansProvider {
|
|
|
8062
8206
|
* Describes how an `Injector` should be configured as static (that is, without reflection).
|
|
8063
8207
|
* A static provider provides tokens to an injector for various types of dependencies.
|
|
8064
8208
|
*
|
|
8065
|
-
* @see {@link Injector.create()}
|
|
8209
|
+
* @see {@link Injector.create()}
|
|
8066
8210
|
* @see ["Dependency Injection Guide"](guide/dependency-injection-providers).
|
|
8067
8211
|
*
|
|
8068
8212
|
* @publicApi
|
|
@@ -9792,7 +9936,7 @@ export declare const ViewChild: ViewChildDecorator;
|
|
|
9792
9936
|
/**
|
|
9793
9937
|
* Type of the ViewChild decorator / constructor function.
|
|
9794
9938
|
*
|
|
9795
|
-
* @see {@link ViewChild}
|
|
9939
|
+
* @see {@link ViewChild}
|
|
9796
9940
|
* @publicApi
|
|
9797
9941
|
*/
|
|
9798
9942
|
export declare interface ViewChildDecorator {
|
|
@@ -9869,7 +10013,7 @@ export declare const ViewChildren: ViewChildrenDecorator;
|
|
|
9869
10013
|
/**
|
|
9870
10014
|
* Type of the ViewChildren decorator / constructor function.
|
|
9871
10015
|
*
|
|
9872
|
-
* @see {@link ViewChildren}
|
|
10016
|
+
* @see {@link ViewChildren}
|
|
9873
10017
|
*
|
|
9874
10018
|
* @publicApi
|
|
9875
10019
|
*/
|
|
@@ -10228,6 +10372,31 @@ export declare function ɵ_sanitizeHtml(defaultDoc: any, unsafeHtmlInput: string
|
|
|
10228
10372
|
|
|
10229
10373
|
export declare function ɵ_sanitizeUrl(url: string): string;
|
|
10230
10374
|
|
|
10375
|
+
/**
|
|
10376
|
+
* Implements `afterRender` and `afterNextRender` callback manager logic.
|
|
10377
|
+
*/
|
|
10378
|
+
export declare class ɵAfterRenderEventManager {
|
|
10379
|
+
private callbacks;
|
|
10380
|
+
private deferredCallbacks;
|
|
10381
|
+
private renderDepth;
|
|
10382
|
+
private runningCallbacks;
|
|
10383
|
+
/**
|
|
10384
|
+
* Mark the beginning of a render operation (i.e. CD cycle).
|
|
10385
|
+
* Throws if called from an `afterRender` callback.
|
|
10386
|
+
*/
|
|
10387
|
+
begin(): void;
|
|
10388
|
+
/**
|
|
10389
|
+
* Mark the end of a render operation. Registered callbacks
|
|
10390
|
+
* are invoked if there are no more pending operations.
|
|
10391
|
+
*/
|
|
10392
|
+
end(): void;
|
|
10393
|
+
register(callback: AfterRenderCallback): void;
|
|
10394
|
+
unregister(callback: AfterRenderCallback): void;
|
|
10395
|
+
ngOnDestroy(): void;
|
|
10396
|
+
/** @nocollapse */
|
|
10397
|
+
static ɵprov: unknown;
|
|
10398
|
+
}
|
|
10399
|
+
|
|
10231
10400
|
/**
|
|
10232
10401
|
* Internal token to indicate whether having multiple bootstrapped platform should be allowed (only
|
|
10233
10402
|
* one bootstrapped platform is allowed by default). This token helps to support SSR scenarios.
|
|
@@ -10617,10 +10786,8 @@ export declare function ɵconvertToBitFlags(flags: InjectOptions | InjectFlags |
|
|
|
10617
10786
|
|
|
10618
10787
|
/**
|
|
10619
10788
|
* Create a new `Injector` which is configured using a `defType` of `InjectorType<any>`s.
|
|
10620
|
-
*
|
|
10621
|
-
* @publicApi
|
|
10622
10789
|
*/
|
|
10623
|
-
export declare function ɵcreateInjector(defType: any, parent?: Injector | null, additionalProviders?: StaticProvider
|
|
10790
|
+
export declare function ɵcreateInjector(defType: any, parent?: Injector | null, additionalProviders?: Array<Provider | StaticProvider> | null, name?: string): Injector;
|
|
10624
10791
|
|
|
10625
10792
|
/**
|
|
10626
10793
|
* A list of CssSelectors.
|
|
@@ -10994,6 +11161,24 @@ export declare function ɵinjectChangeDetectorRef(flags: InjectFlags): ChangeDet
|
|
|
10994
11161
|
*/
|
|
10995
11162
|
export declare const ɵINJECTOR_SCOPE: InjectionToken<InjectorScope | null>;
|
|
10996
11163
|
|
|
11164
|
+
/**
|
|
11165
|
+
* An object that defines an injection context for the injector profiler.
|
|
11166
|
+
*/
|
|
11167
|
+
export declare interface ɵInjectorProfilerContext {
|
|
11168
|
+
/**
|
|
11169
|
+
* The Injector that service is being injected into.
|
|
11170
|
+
* - Example: if ModuleA --provides--> ServiceA --injects--> ServiceB
|
|
11171
|
+
* then inject(ServiceB) in ServiceA has ModuleA as an injector context
|
|
11172
|
+
*/
|
|
11173
|
+
injector: Injector;
|
|
11174
|
+
/**
|
|
11175
|
+
* The class where the constructor that is calling `inject` is located
|
|
11176
|
+
* - Example: if ModuleA --provides--> ServiceA --injects--> ServiceB
|
|
11177
|
+
* then inject(ServiceB) in ServiceA has ServiceA as a construction context
|
|
11178
|
+
*/
|
|
11179
|
+
token: Type<unknown> | null;
|
|
11180
|
+
}
|
|
11181
|
+
|
|
10997
11182
|
/**
|
|
10998
11183
|
* Internal create application API that implements the core application creation logic and optional
|
|
10999
11184
|
* bootstrap logic.
|
|
@@ -11637,6 +11822,8 @@ export declare function ɵsetCurrentInjector(injector: Injector | null | undefin
|
|
|
11637
11822
|
*/
|
|
11638
11823
|
export declare function ɵsetDocument(document: Document | undefined): void;
|
|
11639
11824
|
|
|
11825
|
+
export declare function ɵsetInjectorProfilerContext(context: ɵInjectorProfilerContext): ɵInjectorProfilerContext;
|
|
11826
|
+
|
|
11640
11827
|
|
|
11641
11828
|
/**
|
|
11642
11829
|
* Sets the locale id that will be used for translations and ICU expressions.
|
|
@@ -12621,6 +12808,16 @@ export declare function ɵɵcontentQuery<T>(directiveIndex: number, predicate: P
|
|
|
12621
12808
|
*/
|
|
12622
12809
|
export declare function ɵɵCopyDefinitionFeature(definition: ɵDirectiveDef<any> | ɵComponentDef<any>): void;
|
|
12623
12810
|
|
|
12811
|
+
/**
|
|
12812
|
+
* Creates runtime data structures for `{#defer}` blocks.
|
|
12813
|
+
*
|
|
12814
|
+
* @param index The index of the defer block in the data array
|
|
12815
|
+
* @param deferredDepsFn Function that contains dependencies for this defer block
|
|
12816
|
+
*
|
|
12817
|
+
* @codeGenApi
|
|
12818
|
+
*/
|
|
12819
|
+
export declare function ɵɵdefer(index: number, deferredDepsFn: DeferredDepsFn | null): void;
|
|
12820
|
+
|
|
12624
12821
|
/**
|
|
12625
12822
|
* Create a component definition object.
|
|
12626
12823
|
*
|
package/package.json
CHANGED
package/rxjs-interop/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v16.2.0-
|
|
2
|
+
* @license Angular v16.2.0-rc.0
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -64,8 +64,8 @@ export declare interface ToObservableOptions {
|
|
|
64
64
|
* By default, the subscription will be automatically cleaned up when the current [injection
|
|
65
65
|
* context](guide/dependency-injection-context) is destroyed. For example, when `toObservable` is
|
|
66
66
|
* called during the construction of a component, the subscription will be cleaned up when the
|
|
67
|
-
* component is destroyed. If an injection context is not
|
|
68
|
-
* passed instead.
|
|
67
|
+
* component is destroyed. If an [injection context](/guide/dependency-injection-context) is not
|
|
68
|
+
* available, an explicit `Injector` can be passed instead.
|
|
69
69
|
*
|
|
70
70
|
* If the subscription should persist until the `Observable` itself completes, the `manualCleanup`
|
|
71
71
|
* option can be specified instead, which disables the automatic subscription teardown. No injection
|
|
@@ -85,10 +85,11 @@ export declare function toSignal<T>(source: Observable<T> | Subscribable<T>): Si
|
|
|
85
85
|
* `initialValue`, or `undefined` if no `initialValue` is provided. If the `Observable` is
|
|
86
86
|
* guaranteed to emit synchronously, then the `requireSync` option can be passed instead.
|
|
87
87
|
*
|
|
88
|
-
* By default, the subscription will be automatically cleaned up when the current injection
|
|
89
|
-
* is destroyed. For example, when `toObservable` is
|
|
90
|
-
* the subscription will be cleaned up when the
|
|
91
|
-
* not available, an explicit `Injector` can be
|
|
88
|
+
* By default, the subscription will be automatically cleaned up when the current [injection
|
|
89
|
+
* context](/guide/dependency-injection-context) is destroyed. For example, when `toObservable` is
|
|
90
|
+
* called during the construction of a component, the subscription will be cleaned up when the
|
|
91
|
+
* component is destroyed. If an injection context is not available, an explicit `Injector` can be
|
|
92
|
+
* passed instead.
|
|
92
93
|
*
|
|
93
94
|
* If the subscription should persist until the `Observable` itself completes, the `manualCleanup`
|
|
94
95
|
* option can be specified instead, which disables the automatic subscription teardown. No injection
|
|
@@ -115,8 +116,8 @@ export declare function toSignal<T>(source: Observable<T> | Subscribable<T>, opt
|
|
|
115
116
|
* By default, the subscription will be automatically cleaned up when the current [injection
|
|
116
117
|
* context](guide/dependency-injection-context) is destroyed. For example, when `toObservable` is
|
|
117
118
|
* called during the construction of a component, the subscription will be cleaned up when the
|
|
118
|
-
* component is destroyed. If an injection context is not
|
|
119
|
-
* passed instead.
|
|
119
|
+
* component is destroyed. If an [injection context](/guide/dependency-injection-context) is not
|
|
120
|
+
* available, an explicit `Injector` can be passed instead.
|
|
120
121
|
*
|
|
121
122
|
* If the subscription should persist until the `Observable` itself completes, the `manualCleanup`
|
|
122
123
|
* option can be specified instead, which disables the automatic subscription teardown. No injection
|
|
@@ -141,10 +142,11 @@ export declare function toSignal<T, U extends T | null | undefined>(source: Obse
|
|
|
141
142
|
* immediately upon subscription. No `initialValue` is needed in this case, and the returned signal
|
|
142
143
|
* does not include an `undefined` type.
|
|
143
144
|
*
|
|
144
|
-
* By default, the subscription will be automatically cleaned up when the current injection
|
|
145
|
-
* is destroyed. For example, when `toObservable` is
|
|
146
|
-
* the subscription will be cleaned up when the
|
|
147
|
-
* not available, an explicit `Injector` can be
|
|
145
|
+
* By default, the subscription will be automatically cleaned up when the current [injection
|
|
146
|
+
* context](/guide/dependency-injection-context) is destroyed. For example, when `toObservable` is
|
|
147
|
+
* called during the construction of a component, the subscription will be cleaned up when the
|
|
148
|
+
* component is destroyed. If an injection context is not available, an explicit `Injector` can be
|
|
149
|
+
* passed instead.
|
|
148
150
|
*
|
|
149
151
|
* If the subscription should persist until the `Observable` itself completes, the `manualCleanup`
|
|
150
152
|
* option can be specified instead, which disables the automatic subscription teardown. No injection
|
|
@@ -180,8 +182,8 @@ export declare interface ToSignalOptions<T> {
|
|
|
180
182
|
/**
|
|
181
183
|
* `Injector` which will provide the `DestroyRef` used to clean up the Observable subscription.
|
|
182
184
|
*
|
|
183
|
-
* If this is not provided, a `DestroyRef` will be retrieved from the current injection
|
|
184
|
-
* unless manual cleanup is requested.
|
|
185
|
+
* If this is not provided, a `DestroyRef` will be retrieved from the current [injection
|
|
186
|
+
* context](/guide/dependency-injection-context), unless manual cleanup is requested.
|
|
185
187
|
*/
|
|
186
188
|
injector?: Injector;
|
|
187
189
|
/**
|
|
@@ -60,7 +60,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
60
60
|
});
|
|
61
61
|
};
|
|
62
62
|
|
|
63
|
-
// bazel-out/
|
|
63
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/migrations/guard-and-resolve-interfaces/index.mjs
|
|
64
64
|
var guard_and_resolve_interfaces_exports = {};
|
|
65
65
|
__export(guard_and_resolve_interfaces_exports, {
|
|
66
66
|
default: () => guard_and_resolve_interfaces_default
|
|
@@ -69,7 +69,7 @@ module.exports = __toCommonJS(guard_and_resolve_interfaces_exports);
|
|
|
69
69
|
var import_schematics = require("@angular-devkit/schematics");
|
|
70
70
|
var import_path3 = require("path");
|
|
71
71
|
|
|
72
|
-
// bazel-out/
|
|
72
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/project_tsconfig_paths.mjs
|
|
73
73
|
var import_core = require("@angular-devkit/core");
|
|
74
74
|
function getProjectTsConfigPaths(tree) {
|
|
75
75
|
return __async(this, null, function* () {
|
|
@@ -149,11 +149,11 @@ function getWorkspace(tree) {
|
|
|
149
149
|
});
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
-
// bazel-out/
|
|
152
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/typescript/compiler_host.mjs
|
|
153
153
|
var import_path = require("path");
|
|
154
154
|
var import_typescript2 = __toESM(require("typescript"), 1);
|
|
155
155
|
|
|
156
|
-
// bazel-out/
|
|
156
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/typescript/parse_tsconfig.mjs
|
|
157
157
|
var path = __toESM(require("path"), 1);
|
|
158
158
|
var import_typescript = __toESM(require("typescript"), 1);
|
|
159
159
|
function parseTsconfigFile(tsconfigPath, basePath) {
|
|
@@ -170,7 +170,7 @@ function parseTsconfigFile(tsconfigPath, basePath) {
|
|
|
170
170
|
return import_typescript.default.parseJsonConfigFileContent(config, parseConfigHost, basePath, {});
|
|
171
171
|
}
|
|
172
172
|
|
|
173
|
-
// bazel-out/
|
|
173
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/typescript/compiler_host.mjs
|
|
174
174
|
function createMigrationProgram(tree, tsconfigPath, basePath, fakeFileRead, additionalFiles) {
|
|
175
175
|
const { rootNames, options, host } = createProgramOptions(tree, tsconfigPath, basePath, fakeFileRead, additionalFiles);
|
|
176
176
|
return import_typescript2.default.createProgram(rootNames, options, host);
|
|
@@ -203,13 +203,13 @@ function canMigrateFile(basePath, sourceFile, program) {
|
|
|
203
203
|
return !(0, import_path.relative)(basePath, sourceFile.fileName).startsWith("..");
|
|
204
204
|
}
|
|
205
205
|
|
|
206
|
-
// bazel-out/
|
|
206
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/migrations/guard-and-resolve-interfaces/util.mjs
|
|
207
207
|
var import_typescript7 = __toESM(require("typescript"), 1);
|
|
208
208
|
|
|
209
|
-
// bazel-out/
|
|
209
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/change_tracker.mjs
|
|
210
210
|
var import_typescript4 = __toESM(require("typescript"), 1);
|
|
211
211
|
|
|
212
|
-
// bazel-out/
|
|
212
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/import_manager.mjs
|
|
213
213
|
var import_path2 = require("path");
|
|
214
214
|
var import_typescript3 = __toESM(require("typescript"), 1);
|
|
215
215
|
var ImportManager = class {
|
|
@@ -393,7 +393,7 @@ ${text}`;
|
|
|
393
393
|
}
|
|
394
394
|
};
|
|
395
395
|
|
|
396
|
-
// bazel-out/
|
|
396
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/change_tracker.mjs
|
|
397
397
|
var ChangeTracker = class {
|
|
398
398
|
constructor(_printer, _importRemapper) {
|
|
399
399
|
__publicField(this, "_printer");
|
|
@@ -449,7 +449,7 @@ function normalizePath(path2) {
|
|
|
449
449
|
return path2.replace(/\\/g, "/");
|
|
450
450
|
}
|
|
451
451
|
|
|
452
|
-
// bazel-out/
|
|
452
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/typescript/imports.mjs
|
|
453
453
|
var import_typescript5 = __toESM(require("typescript"), 1);
|
|
454
454
|
function getImportOfIdentifier(typeChecker, node) {
|
|
455
455
|
const symbol = typeChecker.getSymbolAtLocation(node);
|
|
@@ -521,7 +521,7 @@ function findImportSpecifier(nodes, specifierName) {
|
|
|
521
521
|
});
|
|
522
522
|
}
|
|
523
523
|
|
|
524
|
-
// bazel-out/
|
|
524
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/typescript/nodes.mjs
|
|
525
525
|
var import_typescript6 = __toESM(require("typescript"), 1);
|
|
526
526
|
function closestNode(node, predicate) {
|
|
527
527
|
let current = node.parent;
|
|
@@ -534,7 +534,7 @@ function closestNode(node, predicate) {
|
|
|
534
534
|
return null;
|
|
535
535
|
}
|
|
536
536
|
|
|
537
|
-
// bazel-out/
|
|
537
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/migrations/guard-and-resolve-interfaces/util.mjs
|
|
538
538
|
var deprecatedInterfaces = /* @__PURE__ */ new Set(["CanLoad", "CanMatch", "CanActivate", "CanDeactivate", "CanActivateChild", "Resolve"]);
|
|
539
539
|
var routerModule = "@angular/router";
|
|
540
540
|
function migrateFile(sourceFile, typeChecker, rewriteFn) {
|
|
@@ -647,7 +647,7 @@ function visitTypeReference(typeReference, typeChecker, changeTracker, sourceFil
|
|
|
647
647
|
import_typescript7.default.forEachChild(typeReference, visitTypeReferenceChildren);
|
|
648
648
|
}
|
|
649
649
|
|
|
650
|
-
// bazel-out/
|
|
650
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/migrations/guard-and-resolve-interfaces/index.mjs
|
|
651
651
|
function guard_and_resolve_interfaces_default() {
|
|
652
652
|
return (tree) => __async(this, null, function* () {
|
|
653
653
|
const { buildPaths, testPaths } = yield getProjectTsConfigPaths(tree);
|
|
@@ -56,7 +56,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
56
56
|
});
|
|
57
57
|
};
|
|
58
58
|
|
|
59
|
-
// bazel-out/
|
|
59
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/migrations/remove-module-id/index.mjs
|
|
60
60
|
var remove_module_id_exports = {};
|
|
61
61
|
__export(remove_module_id_exports, {
|
|
62
62
|
default: () => remove_module_id_default
|
|
@@ -66,13 +66,13 @@ var import_schematics = require("@angular-devkit/schematics");
|
|
|
66
66
|
var import_path2 = require("path");
|
|
67
67
|
var import_typescript8 = __toESM(require("typescript"), 1);
|
|
68
68
|
|
|
69
|
-
// bazel-out/
|
|
69
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/extract_metadata.mjs
|
|
70
70
|
var import_typescript4 = __toESM(require("typescript"), 1);
|
|
71
71
|
|
|
72
|
-
// bazel-out/
|
|
72
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/typescript/decorators.mjs
|
|
73
73
|
var import_typescript2 = __toESM(require("typescript"), 1);
|
|
74
74
|
|
|
75
|
-
// bazel-out/
|
|
75
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/typescript/imports.mjs
|
|
76
76
|
var import_typescript = __toESM(require("typescript"), 1);
|
|
77
77
|
function getImportOfIdentifier(typeChecker, node) {
|
|
78
78
|
const symbol = typeChecker.getSymbolAtLocation(node);
|
|
@@ -94,7 +94,7 @@ function getImportOfIdentifier(typeChecker, node) {
|
|
|
94
94
|
};
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
// bazel-out/
|
|
97
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/typescript/decorators.mjs
|
|
98
98
|
function getCallDecoratorImport(typeChecker, decorator) {
|
|
99
99
|
if (!import_typescript2.default.isCallExpression(decorator.expression) || !import_typescript2.default.isIdentifier(decorator.expression.expression)) {
|
|
100
100
|
return null;
|
|
@@ -103,7 +103,7 @@ function getCallDecoratorImport(typeChecker, decorator) {
|
|
|
103
103
|
return getImportOfIdentifier(typeChecker, identifier);
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
-
// bazel-out/
|
|
106
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/ng_decorators.mjs
|
|
107
107
|
function getAngularDecorators(typeChecker, decorators) {
|
|
108
108
|
return decorators.map((node) => ({ node, importData: getCallDecoratorImport(typeChecker, node) })).filter(({ importData }) => importData && importData.importModule.startsWith("@angular/")).map(({ node, importData }) => ({
|
|
109
109
|
node,
|
|
@@ -113,7 +113,7 @@ function getAngularDecorators(typeChecker, decorators) {
|
|
|
113
113
|
}));
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
-
// bazel-out/
|
|
116
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/typescript/functions.mjs
|
|
117
117
|
var import_typescript3 = __toESM(require("typescript"), 1);
|
|
118
118
|
function unwrapExpression(node) {
|
|
119
119
|
if (import_typescript3.default.isParenthesizedExpression(node) || import_typescript3.default.isAsExpression(node)) {
|
|
@@ -123,7 +123,7 @@ function unwrapExpression(node) {
|
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
-
// bazel-out/
|
|
126
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/extract_metadata.mjs
|
|
127
127
|
function extractAngularClassMetadata(typeChecker, node) {
|
|
128
128
|
const decorators = import_typescript4.default.getDecorators(node);
|
|
129
129
|
if (!decorators || !decorators.length) {
|
|
@@ -150,7 +150,7 @@ function extractAngularClassMetadata(typeChecker, node) {
|
|
|
150
150
|
};
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
-
// bazel-out/
|
|
153
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/project_tsconfig_paths.mjs
|
|
154
154
|
var import_core = require("@angular-devkit/core");
|
|
155
155
|
function getProjectTsConfigPaths(tree) {
|
|
156
156
|
return __async(this, null, function* () {
|
|
@@ -230,11 +230,11 @@ function getWorkspace(tree) {
|
|
|
230
230
|
});
|
|
231
231
|
}
|
|
232
232
|
|
|
233
|
-
// bazel-out/
|
|
233
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/typescript/compiler_host.mjs
|
|
234
234
|
var import_path = require("path");
|
|
235
235
|
var import_typescript6 = __toESM(require("typescript"), 1);
|
|
236
236
|
|
|
237
|
-
// bazel-out/
|
|
237
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/typescript/parse_tsconfig.mjs
|
|
238
238
|
var path = __toESM(require("path"), 1);
|
|
239
239
|
var import_typescript5 = __toESM(require("typescript"), 1);
|
|
240
240
|
function parseTsconfigFile(tsconfigPath, basePath) {
|
|
@@ -251,7 +251,7 @@ function parseTsconfigFile(tsconfigPath, basePath) {
|
|
|
251
251
|
return import_typescript5.default.parseJsonConfigFileContent(config, parseConfigHost, basePath, {});
|
|
252
252
|
}
|
|
253
253
|
|
|
254
|
-
// bazel-out/
|
|
254
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/typescript/compiler_host.mjs
|
|
255
255
|
function createMigrationProgram(tree, tsconfigPath, basePath, fakeFileRead, additionalFiles) {
|
|
256
256
|
const { rootNames, options, host } = createProgramOptions(tree, tsconfigPath, basePath, fakeFileRead, additionalFiles);
|
|
257
257
|
return import_typescript6.default.createProgram(rootNames, options, host);
|
|
@@ -284,7 +284,7 @@ function canMigrateFile(basePath, sourceFile, program) {
|
|
|
284
284
|
return !(0, import_path.relative)(basePath, sourceFile.fileName).startsWith("..");
|
|
285
285
|
}
|
|
286
286
|
|
|
287
|
-
// bazel-out/
|
|
287
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/utils/typescript/property_name.mjs
|
|
288
288
|
var import_typescript7 = __toESM(require("typescript"), 1);
|
|
289
289
|
function getPropertyNameText(node) {
|
|
290
290
|
if (import_typescript7.default.isIdentifier(node) || import_typescript7.default.isStringLiteralLike(node)) {
|
|
@@ -293,7 +293,7 @@ function getPropertyNameText(node) {
|
|
|
293
293
|
return null;
|
|
294
294
|
}
|
|
295
295
|
|
|
296
|
-
// bazel-out/
|
|
296
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/core/schematics/migrations/remove-module-id/index.mjs
|
|
297
297
|
function remove_module_id_default() {
|
|
298
298
|
return (tree) => __async(this, null, function* () {
|
|
299
299
|
const { buildPaths, testPaths } = yield getProjectTsConfigPaths(tree);
|