@angular/core 16.0.0-next.5 → 16.0.0-next.7
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/index.mjs +9 -0
- package/esm2022/rxjs-interop/public_api.mjs +15 -0
- package/esm2022/rxjs-interop/rxjs-interop.mjs +5 -0
- package/esm2022/rxjs-interop/src/from_observable.mjs +46 -0
- package/esm2022/rxjs-interop/src/from_signal.mjs +36 -0
- package/esm2022/rxjs-interop/src/index.mjs +11 -0
- package/esm2022/rxjs-interop/src/take_until_destroyed.mjs +33 -0
- package/esm2022/src/application_ref.mjs +78 -19
- package/esm2022/src/change_detection/differs/iterable_differs.mjs +1 -1
- package/esm2022/src/core.mjs +2 -2
- package/esm2022/src/core_private_export.mjs +3 -4
- package/esm2022/src/core_reactivity_export_internal.mjs +1 -1
- package/esm2022/src/di/index.mjs +1 -4
- package/esm2022/src/errors.mjs +3 -2
- package/esm2022/src/hydration/annotate.mjs +4 -2
- package/esm2022/src/hydration/api.mjs +40 -38
- package/esm2022/src/hydration/cleanup.mjs +11 -19
- package/esm2022/src/hydration/error_handling.mjs +8 -8
- package/esm2022/src/linker/component_factory.mjs +1 -1
- package/esm2022/src/linker/query_list.mjs +1 -5
- package/esm2022/src/linker/template_ref.mjs +2 -2
- package/esm2022/src/linker/view_container_ref.mjs +2 -2
- package/esm2022/src/linker/view_ref.mjs +2 -2
- package/esm2022/src/metadata/ng_module.mjs +1 -2
- package/esm2022/src/render3/component_ref.mjs +18 -9
- package/esm2022/src/render3/hooks.mjs +32 -28
- package/esm2022/src/render3/instructions/element.mjs +2 -1
- package/esm2022/src/render3/instructions/element_container.mjs +1 -2
- package/esm2022/src/render3/instructions/shared.mjs +28 -16
- package/esm2022/src/render3/interfaces/view.mjs +16 -17
- package/esm2022/src/render3/ng_module_ref.mjs +9 -7
- package/esm2022/src/render3/pipe.mjs +2 -2
- package/esm2022/src/render3/reactive_lview_consumer.mjs +2 -1
- package/esm2022/src/render3/reactivity/effect.mjs +55 -45
- package/esm2022/src/sanitization/sanitization.mjs +3 -3
- package/esm2022/src/sanitization/url_sanitizer.mjs +7 -6
- package/esm2022/src/signals/index.mjs +5 -4
- package/esm2022/src/signals/src/api.mjs +1 -2
- package/esm2022/src/signals/src/computed.mjs +2 -1
- package/esm2022/src/signals/src/errors.mjs +18 -0
- package/esm2022/src/signals/src/graph.mjs +35 -8
- package/esm2022/src/signals/src/signal.mjs +26 -1
- package/esm2022/src/signals/src/watch.mjs +3 -2
- package/esm2022/src/signals/src/weak_ref.mjs +4 -1
- package/esm2022/src/util/decorators.mjs +6 -1
- package/esm2022/src/util/ng_dev_mode.mjs +2 -1
- package/esm2022/src/version.mjs +1 -1
- package/esm2022/testing/src/fake_async.mjs +2 -2
- package/esm2022/testing/src/logger.mjs +3 -3
- package/esm2022/testing/src/ng_zone_mock.mjs +3 -3
- package/esm2022/testing/src/test_bed_compiler.mjs +3 -4
- package/fesm2022/core.mjs +9306 -9920
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/rxjs-interop.mjs +104 -0
- package/fesm2022/rxjs-interop.mjs.map +1 -0
- package/fesm2022/testing.mjs +2361 -2639
- package/fesm2022/testing.mjs.map +1 -1
- package/index.d.ts +171 -450
- package/package.json +7 -1
- package/rxjs-interop/index.d.ts +95 -0
- 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 +1515 -1718
- package/schematics/ng-generate/standalone-migration/bundle.js.map +4 -4
- package/testing/index.d.ts +2 -2
- package/esm2022/src/di/reflective_errors.mjs +0 -217
- package/esm2022/src/di/reflective_injector.mjs +0 -311
- package/esm2022/src/di/reflective_key.mjs +0 -73
- package/esm2022/src/di/reflective_provider.mjs +0 -209
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v16.0.0-next.
|
|
2
|
+
* @license Angular v16.0.0-next.7
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -513,6 +513,13 @@ export declare class ApplicationRef {
|
|
|
513
513
|
*/
|
|
514
514
|
detachView(viewRef: ViewRef): void;
|
|
515
515
|
private _loadComponent;
|
|
516
|
+
/**
|
|
517
|
+
* Registers a listener to be called when an instance is destroyed.
|
|
518
|
+
*
|
|
519
|
+
* @param callback A callback function to add as a listener.
|
|
520
|
+
* @returns A function which unregisters a listener.
|
|
521
|
+
*/
|
|
522
|
+
onDestroy(callback: () => void): VoidFunction;
|
|
516
523
|
/**
|
|
517
524
|
* Destroys an Angular application represented by this `ApplicationRef`. Calling this function
|
|
518
525
|
* will destroy the associated environment injectors as well as all the bootstrapped components
|
|
@@ -786,9 +793,9 @@ export declare abstract class ChangeDetectorRef {
|
|
|
786
793
|
declare interface ChangeDetectorRefInterface extends ChangeDetectorRef {
|
|
787
794
|
}
|
|
788
795
|
|
|
789
|
-
declare const CHILD_HEAD =
|
|
796
|
+
declare const CHILD_HEAD = 12;
|
|
790
797
|
|
|
791
|
-
declare const CHILD_TAIL =
|
|
798
|
+
declare const CHILD_TAIL = 13;
|
|
792
799
|
|
|
793
800
|
/**
|
|
794
801
|
* Configures the `Injector` to return an instance of `useClass` for a token.
|
|
@@ -1467,7 +1474,7 @@ export declare abstract class ComponentRef<C> {
|
|
|
1467
1474
|
*/
|
|
1468
1475
|
abstract get instance(): C;
|
|
1469
1476
|
/**
|
|
1470
|
-
* The [host view](guide/glossary#view-
|
|
1477
|
+
* The [host view](guide/glossary#view-hierarchy) defined by the template
|
|
1471
1478
|
* for this component instance.
|
|
1472
1479
|
*/
|
|
1473
1480
|
abstract get hostView(): ViewRef;
|
|
@@ -1843,6 +1850,13 @@ export declare interface CreateEffectOptions {
|
|
|
1843
1850
|
* with the current `DestroyRef`.
|
|
1844
1851
|
*/
|
|
1845
1852
|
manualCleanup?: boolean;
|
|
1853
|
+
/**
|
|
1854
|
+
* Whether the `effect` should allow writing to signals.
|
|
1855
|
+
*
|
|
1856
|
+
* Using effects to synchronize data by writing to signals can lead to confusing and potentially
|
|
1857
|
+
* incorrect behavior, and should be enabled only when necessary.
|
|
1858
|
+
*/
|
|
1859
|
+
allowSignalWrites?: boolean;
|
|
1846
1860
|
}
|
|
1847
1861
|
|
|
1848
1862
|
/**
|
|
@@ -2151,23 +2165,11 @@ export declare class DebugNode {
|
|
|
2151
2165
|
get providerTokens(): any[];
|
|
2152
2166
|
}
|
|
2153
2167
|
|
|
2154
|
-
declare const DECLARATION_COMPONENT_VIEW =
|
|
2155
|
-
|
|
2156
|
-
declare const DECLARATION_LCONTAINER = 17;
|
|
2168
|
+
declare const DECLARATION_COMPONENT_VIEW = 15;
|
|
2157
2169
|
|
|
2158
|
-
declare const
|
|
2170
|
+
declare const DECLARATION_LCONTAINER = 16;
|
|
2159
2171
|
|
|
2160
|
-
|
|
2161
|
-
* Makes `T` read-only at the property level.
|
|
2162
|
-
*
|
|
2163
|
-
* Objects have their properties mapped to `DeepReadonly` types and arrays are converted to
|
|
2164
|
-
* `ReadonlyArray`s of `DeepReadonly` values.
|
|
2165
|
-
*
|
|
2166
|
-
* @developerPreview
|
|
2167
|
-
*/
|
|
2168
|
-
export declare type DeepReadonly<T> = T extends (infer R)[] ? ReadonlyArray<DeepReadonly<R>> : (T extends Function ? T : (T extends object ? {
|
|
2169
|
-
readonly [P in keyof T]: DeepReadonly<T[P]>;
|
|
2170
|
-
} : T));
|
|
2172
|
+
declare const DECLARATION_VIEW = 14;
|
|
2171
2173
|
|
|
2172
2174
|
/**
|
|
2173
2175
|
* Provide this token to set the default currency code your application uses for
|
|
@@ -2942,6 +2944,19 @@ export declare function effect(effectFn: () => EffectCleanupFn | void, options?:
|
|
|
2942
2944
|
*/
|
|
2943
2945
|
export declare type EffectCleanupFn = () => void;
|
|
2944
2946
|
|
|
2947
|
+
/**
|
|
2948
|
+
* Tracks all effects registered within a given application and runs them via `flush`.
|
|
2949
|
+
*/
|
|
2950
|
+
declare class EffectManager {
|
|
2951
|
+
private all;
|
|
2952
|
+
private queue;
|
|
2953
|
+
create(effectFn: () => void, destroyRef: DestroyRef | null, allowSignalWrites: boolean): EffectRef;
|
|
2954
|
+
flush(): void;
|
|
2955
|
+
get isQueueEmpty(): boolean;
|
|
2956
|
+
/** @nocollapse */
|
|
2957
|
+
static ɵprov: unknown;
|
|
2958
|
+
}
|
|
2959
|
+
|
|
2945
2960
|
/**
|
|
2946
2961
|
* A global reactive effect, which can be manually destroyed.
|
|
2947
2962
|
*
|
|
@@ -3009,11 +3024,11 @@ export declare class ElementRef<T = any> {
|
|
|
3009
3024
|
constructor(nativeElement: T);
|
|
3010
3025
|
}
|
|
3011
3026
|
|
|
3012
|
-
declare const EMBEDDED_VIEW_INJECTOR =
|
|
3027
|
+
declare const EMBEDDED_VIEW_INJECTOR = 20;
|
|
3013
3028
|
|
|
3014
3029
|
/**
|
|
3015
3030
|
* Represents an Angular [view](guide/glossary#view) in a view container.
|
|
3016
|
-
* An [embedded view](guide/glossary#view-
|
|
3031
|
+
* An [embedded view](guide/glossary#view-hierarchy) can be referenced from a component
|
|
3017
3032
|
* other than the hosting component whose template defines it, or it can be defined
|
|
3018
3033
|
* independently by a `TemplateRef`.
|
|
3019
3034
|
*
|
|
@@ -3091,6 +3106,8 @@ export declare abstract class EmbeddedViewRef<C> extends ViewRef {
|
|
|
3091
3106
|
*/
|
|
3092
3107
|
export declare function enableProdMode(): void;
|
|
3093
3108
|
|
|
3109
|
+
declare const ENVIRONMENT = 10;
|
|
3110
|
+
|
|
3094
3111
|
/**
|
|
3095
3112
|
* A multi-provider token for initialization functions that will run upon construction of an
|
|
3096
3113
|
* environment injector.
|
|
@@ -3818,7 +3835,7 @@ export declare interface HostListenerDecorator {
|
|
|
3818
3835
|
new (eventName: string, args?: string[]): any;
|
|
3819
3836
|
}
|
|
3820
3837
|
|
|
3821
|
-
declare const HYDRATION =
|
|
3838
|
+
declare const HYDRATION = 22;
|
|
3822
3839
|
|
|
3823
3840
|
declare namespace i0 {
|
|
3824
3841
|
export {
|
|
@@ -4041,7 +4058,7 @@ declare const enum IcuType {
|
|
|
4041
4058
|
plural = 1
|
|
4042
4059
|
}
|
|
4043
4060
|
|
|
4044
|
-
declare const ID =
|
|
4061
|
+
declare const ID = 19;
|
|
4045
4062
|
|
|
4046
4063
|
/**
|
|
4047
4064
|
* Providers that were imported from NgModules via the `importProvidersFrom` function.
|
|
@@ -4789,12 +4806,9 @@ export declare interface IterableDifferFactory {
|
|
|
4789
4806
|
* @publicApi
|
|
4790
4807
|
*/
|
|
4791
4808
|
export declare class IterableDiffers {
|
|
4809
|
+
private factories;
|
|
4792
4810
|
/** @nocollapse */
|
|
4793
4811
|
static ɵprov: unknown;
|
|
4794
|
-
/**
|
|
4795
|
-
* @deprecated v4.0.0 - Should be private
|
|
4796
|
-
*/
|
|
4797
|
-
factories: IterableDifferFactory[];
|
|
4798
4812
|
constructor(factories: IterableDifferFactory[]);
|
|
4799
4813
|
static create(factories: IterableDifferFactory[], parent?: IterableDiffers): IterableDiffers;
|
|
4800
4814
|
/**
|
|
@@ -5238,12 +5252,12 @@ declare interface LView<T = unknown> extends Array<any> {
|
|
|
5238
5252
|
[CONTEXT]: T;
|
|
5239
5253
|
/** An optional Module Injector to be used as fall back after Element Injectors are consulted. */
|
|
5240
5254
|
readonly [INJECTOR_2]: Injector | null;
|
|
5241
|
-
/**
|
|
5242
|
-
|
|
5255
|
+
/**
|
|
5256
|
+
* Contextual data that is shared across multiple instances of `LView` in the same application.
|
|
5257
|
+
*/
|
|
5258
|
+
[ENVIRONMENT]: LViewEnvironment;
|
|
5243
5259
|
/** Renderer to be used for this view. */
|
|
5244
5260
|
[RENDERER]: Renderer;
|
|
5245
|
-
/** An optional custom sanitizer. */
|
|
5246
|
-
[SANITIZER]: Sanitizer | null;
|
|
5247
5261
|
/**
|
|
5248
5262
|
* Reference to the first LView or LContainer beneath this LView in
|
|
5249
5263
|
* the hierarchy.
|
|
@@ -5402,6 +5416,18 @@ declare interface LView<T = unknown> extends Array<any> {
|
|
|
5402
5416
|
[REACTIVE_HOST_BINDING_CONSUMER]: ReactiveLViewConsumer | null;
|
|
5403
5417
|
}
|
|
5404
5418
|
|
|
5419
|
+
/**
|
|
5420
|
+
* Contextual data that is shared across multiple instances of `LView` in the same application.
|
|
5421
|
+
*/
|
|
5422
|
+
declare interface LViewEnvironment {
|
|
5423
|
+
/** Factory to be used for creating Renderer. */
|
|
5424
|
+
rendererFactory: RendererFactory;
|
|
5425
|
+
/** An optional custom sanitizer. */
|
|
5426
|
+
sanitizer: Sanitizer | null;
|
|
5427
|
+
/** Container for reactivity system `effect`s. */
|
|
5428
|
+
effectManager: EffectManager | null;
|
|
5429
|
+
}
|
|
5430
|
+
|
|
5405
5431
|
/** Flags associated with an LView (saved in LView[FLAGS]) */
|
|
5406
5432
|
declare const enum LViewFlags {
|
|
5407
5433
|
/** The state of the init phase on the first 2 bits */
|
|
@@ -5731,7 +5757,6 @@ export declare interface NgModule {
|
|
|
5731
5757
|
|
|
5732
5758
|
/**
|
|
5733
5759
|
* @Annotation
|
|
5734
|
-
* @publicApi
|
|
5735
5760
|
*/
|
|
5736
5761
|
export declare const NgModule: NgModuleDecorator;
|
|
5737
5762
|
|
|
@@ -5967,6 +5992,57 @@ export declare class NgZone {
|
|
|
5967
5992
|
runOutsideAngular<T>(fn: (...args: any[]) => T): T;
|
|
5968
5993
|
}
|
|
5969
5994
|
|
|
5995
|
+
/**
|
|
5996
|
+
* Used to configure event and run coalescing with `provideZoneChangeDetection`.
|
|
5997
|
+
*
|
|
5998
|
+
* @publicApi
|
|
5999
|
+
*
|
|
6000
|
+
* @see provideZoneChangeDetection
|
|
6001
|
+
*/
|
|
6002
|
+
export declare interface NgZoneOptions {
|
|
6003
|
+
/**
|
|
6004
|
+
* Optionally specify coalescing event change detections or not.
|
|
6005
|
+
* Consider the following case.
|
|
6006
|
+
*
|
|
6007
|
+
* ```
|
|
6008
|
+
* <div (click)="doSomething()">
|
|
6009
|
+
* <button (click)="doSomethingElse()"></button>
|
|
6010
|
+
* </div>
|
|
6011
|
+
* ```
|
|
6012
|
+
*
|
|
6013
|
+
* When button is clicked, because of the event bubbling, both
|
|
6014
|
+
* event handlers will be called and 2 change detections will be
|
|
6015
|
+
* triggered. We can coalesce such kind of events to only trigger
|
|
6016
|
+
* change detection only once.
|
|
6017
|
+
*
|
|
6018
|
+
* By default, this option will be false. So the events will not be
|
|
6019
|
+
* coalesced and the change detection will be triggered multiple times.
|
|
6020
|
+
* And if this option be set to true, the change detection will be
|
|
6021
|
+
* triggered async by scheduling a animation frame. So in the case above,
|
|
6022
|
+
* the change detection will only be triggered once.
|
|
6023
|
+
*/
|
|
6024
|
+
eventCoalescing?: boolean;
|
|
6025
|
+
/**
|
|
6026
|
+
* Optionally specify if `NgZone#run()` method invocations should be coalesced
|
|
6027
|
+
* into a single change detection.
|
|
6028
|
+
*
|
|
6029
|
+
* Consider the following case.
|
|
6030
|
+
* ```
|
|
6031
|
+
* for (let i = 0; i < 10; i ++) {
|
|
6032
|
+
* ngZone.run(() => {
|
|
6033
|
+
* // do something
|
|
6034
|
+
* });
|
|
6035
|
+
* }
|
|
6036
|
+
* ```
|
|
6037
|
+
*
|
|
6038
|
+
* This case triggers the change detection multiple times.
|
|
6039
|
+
* With ngZoneRunCoalescing options, all change detections in an event loop trigger only once.
|
|
6040
|
+
* In addition, the change detection executes in requestAnimation.
|
|
6041
|
+
*
|
|
6042
|
+
*/
|
|
6043
|
+
runCoalescing?: boolean;
|
|
6044
|
+
}
|
|
6045
|
+
|
|
5970
6046
|
/**
|
|
5971
6047
|
* Defines a schema that allows any property on any element.
|
|
5972
6048
|
*
|
|
@@ -5982,7 +6058,7 @@ declare const NODES = "n";
|
|
|
5982
6058
|
|
|
5983
6059
|
declare const NUM_ROOT_NODES = "r";
|
|
5984
6060
|
|
|
5985
|
-
declare const ON_DESTROY_HOOKS =
|
|
6061
|
+
declare const ON_DESTROY_HOOKS = 21;
|
|
5986
6062
|
|
|
5987
6063
|
/**
|
|
5988
6064
|
* @description
|
|
@@ -6391,7 +6467,7 @@ export declare interface Predicate<T> {
|
|
|
6391
6467
|
(value: T): boolean;
|
|
6392
6468
|
}
|
|
6393
6469
|
|
|
6394
|
-
declare const PREORDER_HOOK_FLAGS =
|
|
6470
|
+
declare const PREORDER_HOOK_FLAGS = 17;
|
|
6395
6471
|
|
|
6396
6472
|
/** More flags associated with an LView (saved in LView[PREORDER_HOOK_FLAGS]) */
|
|
6397
6473
|
declare const enum PreOrderHookFlags {
|
|
@@ -6467,6 +6543,28 @@ export declare type Provider = TypeProvider | ValueProvider | ClassProvider | Co
|
|
|
6467
6543
|
*/
|
|
6468
6544
|
export declare type ProviderToken<T> = Type<T> | AbstractType<T> | InjectionToken<T>;
|
|
6469
6545
|
|
|
6546
|
+
/**
|
|
6547
|
+
* Provides `NgZone`-based change detection for the application bootstrapped using
|
|
6548
|
+
* `bootstrapApplication`.
|
|
6549
|
+
*
|
|
6550
|
+
* `NgZone` is already provided in applications by default. This provider allows you to configure
|
|
6551
|
+
* options like `eventCoalescing` in the `NgZone`.
|
|
6552
|
+
* This provider is not available for `platformBrowser().bootstrapModule`, which uses
|
|
6553
|
+
* `BootstrapOptions` instead.
|
|
6554
|
+
*
|
|
6555
|
+
* @usageNotes
|
|
6556
|
+
* ```typescript=
|
|
6557
|
+
* bootstrapApplication(MyApp, {providers: [
|
|
6558
|
+
* provideZoneChangeDetection({eventCoalescing: true}),
|
|
6559
|
+
* ]});
|
|
6560
|
+
* ```
|
|
6561
|
+
*
|
|
6562
|
+
* @publicApi
|
|
6563
|
+
* @see bootstrapApplication
|
|
6564
|
+
* @see NgZoneOptions
|
|
6565
|
+
*/
|
|
6566
|
+
export declare function provideZoneChangeDetection(options?: NgZoneOptions): EnvironmentProviders;
|
|
6567
|
+
|
|
6470
6568
|
/**
|
|
6471
6569
|
* Testability API.
|
|
6472
6570
|
* `declare` keyword causes tsickle to generate externs, so these methods are
|
|
@@ -6479,7 +6577,7 @@ declare interface PublicTestability {
|
|
|
6479
6577
|
findProviders(using: any, provider: string, exactMatch: boolean): any[];
|
|
6480
6578
|
}
|
|
6481
6579
|
|
|
6482
|
-
declare const QUERIES =
|
|
6580
|
+
declare const QUERIES = 18;
|
|
6483
6581
|
|
|
6484
6582
|
/**
|
|
6485
6583
|
* Type of the Query metadata.
|
|
@@ -6595,7 +6693,8 @@ export declare class QueryList<T> implements Iterable<T> {
|
|
|
6595
6693
|
* See
|
|
6596
6694
|
* [Array.filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter)
|
|
6597
6695
|
*/
|
|
6598
|
-
filter(
|
|
6696
|
+
filter<S extends T>(predicate: (value: T, index: number, array: readonly T[]) => value is S): S[];
|
|
6697
|
+
filter(predicate: (value: T, index: number, array: readonly T[]) => unknown): T[];
|
|
6599
6698
|
/**
|
|
6600
6699
|
* See
|
|
6601
6700
|
* [Array.find](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find)
|
|
@@ -6840,11 +6939,12 @@ declare interface RDomTokenList {
|
|
|
6840
6939
|
remove(token: string): void;
|
|
6841
6940
|
}
|
|
6842
6941
|
|
|
6843
|
-
declare const REACTIVE_HOST_BINDING_CONSUMER =
|
|
6942
|
+
declare const REACTIVE_HOST_BINDING_CONSUMER = 24;
|
|
6844
6943
|
|
|
6845
|
-
declare const REACTIVE_TEMPLATE_CONSUMER =
|
|
6944
|
+
declare const REACTIVE_TEMPLATE_CONSUMER = 23;
|
|
6846
6945
|
|
|
6847
6946
|
declare class ReactiveLViewConsumer extends ReactiveNode {
|
|
6947
|
+
protected consumerAllowSignalWrites: boolean;
|
|
6848
6948
|
private _lView;
|
|
6849
6949
|
set lView(lView: LView);
|
|
6850
6950
|
protected onConsumerDependencyMayHaveChanged(): void;
|
|
@@ -6908,6 +7008,10 @@ declare abstract class ReactiveNode {
|
|
|
6908
7008
|
* semantically changes.
|
|
6909
7009
|
*/
|
|
6910
7010
|
protected valueVersion: number;
|
|
7011
|
+
/**
|
|
7012
|
+
* Whether signal writes should be allowed while this `ReactiveNode` is the current consumer.
|
|
7013
|
+
*/
|
|
7014
|
+
protected abstract readonly consumerAllowSignalWrites: boolean;
|
|
6911
7015
|
/**
|
|
6912
7016
|
* Called for consumers whenever one of their dependencies notifies that it might have a new
|
|
6913
7017
|
* value.
|
|
@@ -6938,6 +7042,11 @@ declare abstract class ReactiveNode {
|
|
|
6938
7042
|
* Whether this consumer currently has any producers registered.
|
|
6939
7043
|
*/
|
|
6940
7044
|
protected get hasProducers(): boolean;
|
|
7045
|
+
/**
|
|
7046
|
+
* Whether this `ReactiveNode` in its producer capacity is currently allowed to initiate updates,
|
|
7047
|
+
* based on the current consumer context.
|
|
7048
|
+
*/
|
|
7049
|
+
protected get producerUpdatesAllowed(): boolean;
|
|
6941
7050
|
/**
|
|
6942
7051
|
* Checks if a `Producer` has a current value which is different than the value
|
|
6943
7052
|
* last seen at a specific version by a `Consumer` which recorded a dependency on
|
|
@@ -6987,291 +7096,6 @@ declare abstract class ReactiveNode {
|
|
|
6987
7096
|
*/
|
|
6988
7097
|
export declare function reflectComponentType<C>(component: Type<C>): ComponentMirror<C> | null;
|
|
6989
7098
|
|
|
6990
|
-
/**
|
|
6991
|
-
* `Dependency` is used by the framework to extend DI.
|
|
6992
|
-
* This is internal to Angular and should not be used directly.
|
|
6993
|
-
*/
|
|
6994
|
-
declare class ReflectiveDependency {
|
|
6995
|
-
key: ReflectiveKey;
|
|
6996
|
-
optional: boolean;
|
|
6997
|
-
visibility: Self | SkipSelf | null;
|
|
6998
|
-
constructor(key: ReflectiveKey, optional: boolean, visibility: Self | SkipSelf | null);
|
|
6999
|
-
static fromKey(key: ReflectiveKey): ReflectiveDependency;
|
|
7000
|
-
}
|
|
7001
|
-
|
|
7002
|
-
/**
|
|
7003
|
-
* A ReflectiveDependency injection container used for instantiating objects and resolving
|
|
7004
|
-
* dependencies.
|
|
7005
|
-
*
|
|
7006
|
-
* An `Injector` is a replacement for a `new` operator, which can automatically resolve the
|
|
7007
|
-
* constructor dependencies.
|
|
7008
|
-
*
|
|
7009
|
-
* In typical use, application code asks for the dependencies in the constructor and they are
|
|
7010
|
-
* resolved by the `Injector`.
|
|
7011
|
-
*
|
|
7012
|
-
* @usageNotes
|
|
7013
|
-
* ### Example
|
|
7014
|
-
*
|
|
7015
|
-
* The following example creates an `Injector` configured to create `Engine` and `Car`.
|
|
7016
|
-
*
|
|
7017
|
-
* ```typescript
|
|
7018
|
-
* @Injectable()
|
|
7019
|
-
* class Engine {
|
|
7020
|
-
* }
|
|
7021
|
-
*
|
|
7022
|
-
* @Injectable()
|
|
7023
|
-
* class Car {
|
|
7024
|
-
* constructor(public engine:Engine) {}
|
|
7025
|
-
* }
|
|
7026
|
-
*
|
|
7027
|
-
* var injector = ReflectiveInjector.resolveAndCreate([Car, Engine]);
|
|
7028
|
-
* var car = injector.get(Car);
|
|
7029
|
-
* expect(car instanceof Car).toBe(true);
|
|
7030
|
-
* expect(car.engine instanceof Engine).toBe(true);
|
|
7031
|
-
* ```
|
|
7032
|
-
*
|
|
7033
|
-
* Notice, we don't use the `new` operator because we explicitly want to have the `Injector`
|
|
7034
|
-
* resolve all of the object's dependencies automatically.
|
|
7035
|
-
*
|
|
7036
|
-
* TODO: delete in v14.
|
|
7037
|
-
*
|
|
7038
|
-
* @deprecated from v5 - slow and brings in a lot of code, Use `Injector.create` instead.
|
|
7039
|
-
* @publicApi
|
|
7040
|
-
*/
|
|
7041
|
-
export declare abstract class ReflectiveInjector implements Injector {
|
|
7042
|
-
/**
|
|
7043
|
-
* Turns an array of provider definitions into an array of resolved providers.
|
|
7044
|
-
*
|
|
7045
|
-
* A resolution is a process of flattening multiple nested arrays and converting individual
|
|
7046
|
-
* providers into an array of `ResolvedReflectiveProvider`s.
|
|
7047
|
-
*
|
|
7048
|
-
* @usageNotes
|
|
7049
|
-
* ### Example
|
|
7050
|
-
*
|
|
7051
|
-
* ```typescript
|
|
7052
|
-
* @Injectable()
|
|
7053
|
-
* class Engine {
|
|
7054
|
-
* }
|
|
7055
|
-
*
|
|
7056
|
-
* @Injectable()
|
|
7057
|
-
* class Car {
|
|
7058
|
-
* constructor(public engine:Engine) {}
|
|
7059
|
-
* }
|
|
7060
|
-
*
|
|
7061
|
-
* var providers = ReflectiveInjector.resolve([Car, [[Engine]]]);
|
|
7062
|
-
*
|
|
7063
|
-
* expect(providers.length).toEqual(2);
|
|
7064
|
-
*
|
|
7065
|
-
* expect(providers[0] instanceof ResolvedReflectiveProvider).toBe(true);
|
|
7066
|
-
* expect(providers[0].key.displayName).toBe("Car");
|
|
7067
|
-
* expect(providers[0].dependencies.length).toEqual(1);
|
|
7068
|
-
* expect(providers[0].factory).toBeDefined();
|
|
7069
|
-
*
|
|
7070
|
-
* expect(providers[1].key.displayName).toBe("Engine");
|
|
7071
|
-
* });
|
|
7072
|
-
* ```
|
|
7073
|
-
*
|
|
7074
|
-
*/
|
|
7075
|
-
static resolve(providers: Provider[]): ResolvedReflectiveProvider[];
|
|
7076
|
-
/**
|
|
7077
|
-
* Resolves an array of providers and creates an injector from those providers.
|
|
7078
|
-
*
|
|
7079
|
-
* The passed-in providers can be an array of `Type`, `Provider`,
|
|
7080
|
-
* or a recursive array of more providers.
|
|
7081
|
-
*
|
|
7082
|
-
* @usageNotes
|
|
7083
|
-
* ### Example
|
|
7084
|
-
*
|
|
7085
|
-
* ```typescript
|
|
7086
|
-
* @Injectable()
|
|
7087
|
-
* class Engine {
|
|
7088
|
-
* }
|
|
7089
|
-
*
|
|
7090
|
-
* @Injectable()
|
|
7091
|
-
* class Car {
|
|
7092
|
-
* constructor(public engine:Engine) {}
|
|
7093
|
-
* }
|
|
7094
|
-
*
|
|
7095
|
-
* var injector = ReflectiveInjector.resolveAndCreate([Car, Engine]);
|
|
7096
|
-
* expect(injector.get(Car) instanceof Car).toBe(true);
|
|
7097
|
-
* ```
|
|
7098
|
-
*/
|
|
7099
|
-
static resolveAndCreate(providers: Provider[], parent?: Injector): ReflectiveInjector;
|
|
7100
|
-
/**
|
|
7101
|
-
* Creates an injector from previously resolved providers.
|
|
7102
|
-
*
|
|
7103
|
-
* This API is the recommended way to construct injectors in performance-sensitive parts.
|
|
7104
|
-
*
|
|
7105
|
-
* @usageNotes
|
|
7106
|
-
* ### Example
|
|
7107
|
-
*
|
|
7108
|
-
* ```typescript
|
|
7109
|
-
* @Injectable()
|
|
7110
|
-
* class Engine {
|
|
7111
|
-
* }
|
|
7112
|
-
*
|
|
7113
|
-
* @Injectable()
|
|
7114
|
-
* class Car {
|
|
7115
|
-
* constructor(public engine:Engine) {}
|
|
7116
|
-
* }
|
|
7117
|
-
*
|
|
7118
|
-
* var providers = ReflectiveInjector.resolve([Car, Engine]);
|
|
7119
|
-
* var injector = ReflectiveInjector.fromResolvedProviders(providers);
|
|
7120
|
-
* expect(injector.get(Car) instanceof Car).toBe(true);
|
|
7121
|
-
* ```
|
|
7122
|
-
*/
|
|
7123
|
-
static fromResolvedProviders(providers: ResolvedReflectiveProvider[], parent?: Injector): ReflectiveInjector;
|
|
7124
|
-
/**
|
|
7125
|
-
* Parent of this injector.
|
|
7126
|
-
*
|
|
7127
|
-
* <!-- TODO: Add a link to the section of the user guide talking about hierarchical injection.
|
|
7128
|
-
* -->
|
|
7129
|
-
*/
|
|
7130
|
-
abstract get parent(): Injector | null;
|
|
7131
|
-
/**
|
|
7132
|
-
* Resolves an array of providers and creates a child injector from those providers.
|
|
7133
|
-
*
|
|
7134
|
-
* <!-- TODO: Add a link to the section of the user guide talking about hierarchical injection.
|
|
7135
|
-
* -->
|
|
7136
|
-
*
|
|
7137
|
-
* The passed-in providers can be an array of `Type`, `Provider`,
|
|
7138
|
-
* or a recursive array of more providers.
|
|
7139
|
-
*
|
|
7140
|
-
* @usageNotes
|
|
7141
|
-
* ### Example
|
|
7142
|
-
*
|
|
7143
|
-
* ```typescript
|
|
7144
|
-
* class ParentProvider {}
|
|
7145
|
-
* class ChildProvider {}
|
|
7146
|
-
*
|
|
7147
|
-
* var parent = ReflectiveInjector.resolveAndCreate([ParentProvider]);
|
|
7148
|
-
* var child = parent.resolveAndCreateChild([ChildProvider]);
|
|
7149
|
-
*
|
|
7150
|
-
* expect(child.get(ParentProvider) instanceof ParentProvider).toBe(true);
|
|
7151
|
-
* expect(child.get(ChildProvider) instanceof ChildProvider).toBe(true);
|
|
7152
|
-
* expect(child.get(ParentProvider)).toBe(parent.get(ParentProvider));
|
|
7153
|
-
* ```
|
|
7154
|
-
*/
|
|
7155
|
-
abstract resolveAndCreateChild(providers: Provider[]): ReflectiveInjector;
|
|
7156
|
-
/**
|
|
7157
|
-
* Creates a child injector from previously resolved providers.
|
|
7158
|
-
*
|
|
7159
|
-
* <!-- TODO: Add a link to the section of the user guide talking about hierarchical injection.
|
|
7160
|
-
* -->
|
|
7161
|
-
*
|
|
7162
|
-
* This API is the recommended way to construct injectors in performance-sensitive parts.
|
|
7163
|
-
*
|
|
7164
|
-
* @usageNotes
|
|
7165
|
-
* ### Example
|
|
7166
|
-
*
|
|
7167
|
-
* ```typescript
|
|
7168
|
-
* class ParentProvider {}
|
|
7169
|
-
* class ChildProvider {}
|
|
7170
|
-
*
|
|
7171
|
-
* var parentProviders = ReflectiveInjector.resolve([ParentProvider]);
|
|
7172
|
-
* var childProviders = ReflectiveInjector.resolve([ChildProvider]);
|
|
7173
|
-
*
|
|
7174
|
-
* var parent = ReflectiveInjector.fromResolvedProviders(parentProviders);
|
|
7175
|
-
* var child = parent.createChildFromResolved(childProviders);
|
|
7176
|
-
*
|
|
7177
|
-
* expect(child.get(ParentProvider) instanceof ParentProvider).toBe(true);
|
|
7178
|
-
* expect(child.get(ChildProvider) instanceof ChildProvider).toBe(true);
|
|
7179
|
-
* expect(child.get(ParentProvider)).toBe(parent.get(ParentProvider));
|
|
7180
|
-
* ```
|
|
7181
|
-
*/
|
|
7182
|
-
abstract createChildFromResolved(providers: ResolvedReflectiveProvider[]): ReflectiveInjector;
|
|
7183
|
-
/**
|
|
7184
|
-
* Resolves a provider and instantiates an object in the context of the injector.
|
|
7185
|
-
*
|
|
7186
|
-
* The created object does not get cached by the injector.
|
|
7187
|
-
*
|
|
7188
|
-
* @usageNotes
|
|
7189
|
-
* ### Example
|
|
7190
|
-
*
|
|
7191
|
-
* ```typescript
|
|
7192
|
-
* @Injectable()
|
|
7193
|
-
* class Engine {
|
|
7194
|
-
* }
|
|
7195
|
-
*
|
|
7196
|
-
* @Injectable()
|
|
7197
|
-
* class Car {
|
|
7198
|
-
* constructor(public engine:Engine) {}
|
|
7199
|
-
* }
|
|
7200
|
-
*
|
|
7201
|
-
* var injector = ReflectiveInjector.resolveAndCreate([Engine]);
|
|
7202
|
-
*
|
|
7203
|
-
* var car = injector.resolveAndInstantiate(Car);
|
|
7204
|
-
* expect(car.engine).toBe(injector.get(Engine));
|
|
7205
|
-
* expect(car).not.toBe(injector.resolveAndInstantiate(Car));
|
|
7206
|
-
* ```
|
|
7207
|
-
*/
|
|
7208
|
-
abstract resolveAndInstantiate(provider: Provider): any;
|
|
7209
|
-
/**
|
|
7210
|
-
* Instantiates an object using a resolved provider in the context of the injector.
|
|
7211
|
-
*
|
|
7212
|
-
* The created object does not get cached by the injector.
|
|
7213
|
-
*
|
|
7214
|
-
* @usageNotes
|
|
7215
|
-
* ### Example
|
|
7216
|
-
*
|
|
7217
|
-
* ```typescript
|
|
7218
|
-
* @Injectable()
|
|
7219
|
-
* class Engine {
|
|
7220
|
-
* }
|
|
7221
|
-
*
|
|
7222
|
-
* @Injectable()
|
|
7223
|
-
* class Car {
|
|
7224
|
-
* constructor(public engine:Engine) {}
|
|
7225
|
-
* }
|
|
7226
|
-
*
|
|
7227
|
-
* var injector = ReflectiveInjector.resolveAndCreate([Engine]);
|
|
7228
|
-
* var carProvider = ReflectiveInjector.resolve([Car])[0];
|
|
7229
|
-
* var car = injector.instantiateResolved(carProvider);
|
|
7230
|
-
* expect(car.engine).toBe(injector.get(Engine));
|
|
7231
|
-
* expect(car).not.toBe(injector.instantiateResolved(carProvider));
|
|
7232
|
-
* ```
|
|
7233
|
-
*/
|
|
7234
|
-
abstract instantiateResolved(provider: ResolvedReflectiveProvider): any;
|
|
7235
|
-
abstract get(token: any, notFoundValue?: any): any;
|
|
7236
|
-
}
|
|
7237
|
-
|
|
7238
|
-
|
|
7239
|
-
/**
|
|
7240
|
-
* A unique object used for retrieving items from the {@link ReflectiveInjector}.
|
|
7241
|
-
*
|
|
7242
|
-
* Keys have:
|
|
7243
|
-
* - a system-wide unique `id`.
|
|
7244
|
-
* - a `token`.
|
|
7245
|
-
*
|
|
7246
|
-
* `Key` is used internally by {@link ReflectiveInjector} because its system-wide unique `id` allows
|
|
7247
|
-
* the
|
|
7248
|
-
* injector to store created objects in a more efficient way.
|
|
7249
|
-
*
|
|
7250
|
-
* `Key` should not be created directly. {@link ReflectiveInjector} creates keys automatically when
|
|
7251
|
-
* resolving
|
|
7252
|
-
* providers.
|
|
7253
|
-
*
|
|
7254
|
-
* @deprecated No replacement
|
|
7255
|
-
* @publicApi
|
|
7256
|
-
*/
|
|
7257
|
-
export declare class ReflectiveKey {
|
|
7258
|
-
token: Object;
|
|
7259
|
-
id: number;
|
|
7260
|
-
readonly displayName: string;
|
|
7261
|
-
/**
|
|
7262
|
-
* Private
|
|
7263
|
-
*/
|
|
7264
|
-
constructor(token: Object, id: number);
|
|
7265
|
-
/**
|
|
7266
|
-
* Retrieves a `Key` for a token.
|
|
7267
|
-
*/
|
|
7268
|
-
static get(token: Object): ReflectiveKey;
|
|
7269
|
-
/**
|
|
7270
|
-
* @returns the number of keys registered in the system.
|
|
7271
|
-
*/
|
|
7272
|
-
static get numberOfKeys(): number;
|
|
7273
|
-
}
|
|
7274
|
-
|
|
7275
7099
|
/**
|
|
7276
7100
|
* Subset of API needed for writing attributes, properties, and setting up
|
|
7277
7101
|
* listeners on Element.
|
|
@@ -7504,8 +7328,6 @@ export declare abstract class Renderer2 {
|
|
|
7504
7328
|
abstract listen(target: 'window' | 'document' | 'body' | any, eventName: string, callback: (event: any) => boolean | void): () => void;
|
|
7505
7329
|
}
|
|
7506
7330
|
|
|
7507
|
-
declare const RENDERER_FACTORY = 10;
|
|
7508
|
-
|
|
7509
7331
|
declare interface RendererFactory {
|
|
7510
7332
|
createRenderer(hostElement: RElement | null, rendererType: RendererType2 | null): Renderer;
|
|
7511
7333
|
begin?(): void;
|
|
@@ -7590,64 +7412,6 @@ export declare interface RendererType2 {
|
|
|
7590
7412
|
};
|
|
7591
7413
|
}
|
|
7592
7414
|
|
|
7593
|
-
/**
|
|
7594
|
-
* An internal resolved representation of a factory function created by resolving `Provider`.
|
|
7595
|
-
* @publicApi
|
|
7596
|
-
*/
|
|
7597
|
-
export declare class ResolvedReflectiveFactory {
|
|
7598
|
-
/**
|
|
7599
|
-
* Factory function which can return an instance of an object represented by a key.
|
|
7600
|
-
*/
|
|
7601
|
-
factory: Function;
|
|
7602
|
-
/**
|
|
7603
|
-
* Arguments (dependencies) to the `factory` function.
|
|
7604
|
-
*/
|
|
7605
|
-
dependencies: ReflectiveDependency[];
|
|
7606
|
-
constructor(
|
|
7607
|
-
/**
|
|
7608
|
-
* Factory function which can return an instance of an object represented by a key.
|
|
7609
|
-
*/
|
|
7610
|
-
factory: Function,
|
|
7611
|
-
/**
|
|
7612
|
-
* Arguments (dependencies) to the `factory` function.
|
|
7613
|
-
*/
|
|
7614
|
-
dependencies: ReflectiveDependency[]);
|
|
7615
|
-
}
|
|
7616
|
-
|
|
7617
|
-
/**
|
|
7618
|
-
* An internal resolved representation of a `Provider` used by the `Injector`.
|
|
7619
|
-
*
|
|
7620
|
-
* @usageNotes
|
|
7621
|
-
* This is usually created automatically by `Injector.resolveAndCreate`.
|
|
7622
|
-
*
|
|
7623
|
-
* It can be created manually, as follows:
|
|
7624
|
-
*
|
|
7625
|
-
* ### Example
|
|
7626
|
-
*
|
|
7627
|
-
* ```typescript
|
|
7628
|
-
* var resolvedProviders = Injector.resolve([{ provide: 'message', useValue: 'Hello' }]);
|
|
7629
|
-
* var injector = Injector.fromResolvedProviders(resolvedProviders);
|
|
7630
|
-
*
|
|
7631
|
-
* expect(injector.get('message')).toEqual('Hello');
|
|
7632
|
-
* ```
|
|
7633
|
-
*
|
|
7634
|
-
* @publicApi
|
|
7635
|
-
*/
|
|
7636
|
-
export declare interface ResolvedReflectiveProvider {
|
|
7637
|
-
/**
|
|
7638
|
-
* A key, usually a `Type<any>`.
|
|
7639
|
-
*/
|
|
7640
|
-
key: ReflectiveKey;
|
|
7641
|
-
/**
|
|
7642
|
-
* Factory function which can return an instance of an object represented by a key.
|
|
7643
|
-
*/
|
|
7644
|
-
resolvedFactories: ResolvedReflectiveFactory[];
|
|
7645
|
-
/**
|
|
7646
|
-
* Indicates if the provider is a multi-provider or a regular provider.
|
|
7647
|
-
*/
|
|
7648
|
-
multiProvider: boolean;
|
|
7649
|
-
}
|
|
7650
|
-
|
|
7651
7415
|
/**
|
|
7652
7416
|
* Lazily retrieves the reference value from a forwardRef.
|
|
7653
7417
|
*
|
|
@@ -7766,12 +7530,13 @@ declare const enum RuntimeErrorCode {
|
|
|
7766
7530
|
ASYNC_INITIALIZERS_STILL_RUNNING = 405,
|
|
7767
7531
|
APPLICATION_REF_ALREADY_DESTROYED = 406,
|
|
7768
7532
|
RENDERER_NOT_FOUND = 407,
|
|
7769
|
-
HYDRATION_NODE_MISMATCH = 500,
|
|
7770
|
-
HYDRATION_MISSING_SIBLINGS = 501,
|
|
7771
|
-
HYDRATION_MISSING_NODE = 502,
|
|
7772
|
-
UNSUPPORTED_PROJECTION_DOM_NODES = 503,
|
|
7773
|
-
INVALID_SKIP_HYDRATION_HOST = 504,
|
|
7533
|
+
HYDRATION_NODE_MISMATCH = -500,
|
|
7534
|
+
HYDRATION_MISSING_SIBLINGS = -501,
|
|
7535
|
+
HYDRATION_MISSING_NODE = -502,
|
|
7536
|
+
UNSUPPORTED_PROJECTION_DOM_NODES = -503,
|
|
7537
|
+
INVALID_SKIP_HYDRATION_HOST = -504,
|
|
7774
7538
|
HYDRATION_I18N_NOT_YET_SUPPORTED = 518,
|
|
7539
|
+
SIGNAL_WRITE_FROM_ILLEGAL_CONTEXT = 600,
|
|
7775
7540
|
INVALID_I18N_STRUCTURE = 700,
|
|
7776
7541
|
MISSING_LOCALE_DATA = 701,
|
|
7777
7542
|
IMPORT_PROVIDERS_FROM_STANDALONE = 800,
|
|
@@ -7788,8 +7553,6 @@ declare const enum RuntimeErrorCode {
|
|
|
7788
7553
|
UNSAFE_IFRAME_ATTRS = -910
|
|
7789
7554
|
}
|
|
7790
7555
|
|
|
7791
|
-
declare const SANITIZER = 12;
|
|
7792
|
-
|
|
7793
7556
|
/**
|
|
7794
7557
|
* Sanitizer is used by the views to sanitize potentially dangerous values.
|
|
7795
7558
|
*
|
|
@@ -8001,7 +7764,7 @@ declare const SIGNAL: unique symbol;
|
|
|
8001
7764
|
*
|
|
8002
7765
|
* @developerPreview
|
|
8003
7766
|
*/
|
|
8004
|
-
export declare type Signal<T> = (() =>
|
|
7767
|
+
export declare type Signal<T> = (() => T) & {
|
|
8005
7768
|
[SIGNAL]: unknown;
|
|
8006
7769
|
};
|
|
8007
7770
|
|
|
@@ -9773,6 +9536,7 @@ export declare interface TypeDecorator {
|
|
|
9773
9536
|
*/
|
|
9774
9537
|
<T extends Type<any>>(type: T): T;
|
|
9775
9538
|
(target: Object, propertyKey?: string | symbol, parameterIndex?: number): void;
|
|
9539
|
+
(target: unknown, context: unknown): void;
|
|
9776
9540
|
}
|
|
9777
9541
|
|
|
9778
9542
|
declare type TypeOrFactory<T> = T | (() => T);
|
|
@@ -10041,7 +9805,7 @@ export declare interface ViewChildrenDecorator {
|
|
|
10041
9805
|
* (created by instantiating a `TemplateRef` with the `createEmbeddedView()` method).
|
|
10042
9806
|
*
|
|
10043
9807
|
* A view container instance can contain other view containers,
|
|
10044
|
-
* creating a [view hierarchy](guide/glossary#view-
|
|
9808
|
+
* creating a [view hierarchy](guide/glossary#view-hierarchy).
|
|
10045
9809
|
*
|
|
10046
9810
|
* @see `ComponentRef`
|
|
10047
9811
|
* @see `EmbeddedViewRef`
|
|
@@ -10268,7 +10032,7 @@ export declare abstract class ViewRef extends ChangeDetectorRef {
|
|
|
10268
10032
|
* @param callback A handler function that cleans up developer-defined data
|
|
10269
10033
|
* associated with a view. Called when the `destroy()` method is invoked.
|
|
10270
10034
|
*/
|
|
10271
|
-
abstract onDestroy(callback: Function):
|
|
10035
|
+
abstract onDestroy(callback: Function): void;
|
|
10272
10036
|
}
|
|
10273
10037
|
|
|
10274
10038
|
/**
|
|
@@ -10281,7 +10045,6 @@ declare interface ViewRefTracker {
|
|
|
10281
10045
|
detachView(viewRef: ViewRef): void;
|
|
10282
10046
|
}
|
|
10283
10047
|
|
|
10284
|
-
|
|
10285
10048
|
declare interface WeakRef<T extends object> {
|
|
10286
10049
|
deref(): T | undefined;
|
|
10287
10050
|
}
|
|
@@ -11221,15 +10984,6 @@ export declare enum ɵLocaleDataIndex {
|
|
|
11221
10984
|
ExtraData = 21
|
|
11222
10985
|
}
|
|
11223
10986
|
|
|
11224
|
-
/**
|
|
11225
|
-
* @suppress {globalThis}
|
|
11226
|
-
*/
|
|
11227
|
-
export declare function ɵmakeDecorator<T>(name: string, props?: (...args: any[]) => any, parentClass?: any, additionalProcessing?: (type: Type<T>) => void, typeFn?: (type: Type<T>, ...args: any[]) => void): {
|
|
11228
|
-
new (...args: any[]): any;
|
|
11229
|
-
(...args: any[]): any;
|
|
11230
|
-
(...args: any[]): (cls: any) => any;
|
|
11231
|
-
};
|
|
11232
|
-
|
|
11233
10987
|
|
|
11234
10988
|
export declare const ɵNG_COMP_DEF: string;
|
|
11235
10989
|
|
|
@@ -11459,52 +11213,6 @@ export declare const enum ɵProfilerEvent {
|
|
|
11459
11213
|
OutputEnd = 7
|
|
11460
11214
|
}
|
|
11461
11215
|
|
|
11462
|
-
/**
|
|
11463
|
-
* Returns a set of providers required to setup hydration support
|
|
11464
|
-
* for an application that is server side rendered.
|
|
11465
|
-
*
|
|
11466
|
-
* ## NgModule-based bootstrap
|
|
11467
|
-
*
|
|
11468
|
-
* You can add the function call to the root AppModule of an application:
|
|
11469
|
-
* ```
|
|
11470
|
-
* import {provideHydrationSupport} from '@angular/core';
|
|
11471
|
-
*
|
|
11472
|
-
* @NgModule({
|
|
11473
|
-
* providers: [
|
|
11474
|
-
* // ... other providers ...
|
|
11475
|
-
* provideHydrationSupport()
|
|
11476
|
-
* ],
|
|
11477
|
-
* declarations: [AppComponent],
|
|
11478
|
-
* bootstrap: [AppComponent]
|
|
11479
|
-
* })
|
|
11480
|
-
* class AppModule {}
|
|
11481
|
-
* ```
|
|
11482
|
-
*
|
|
11483
|
-
* ## Standalone-based bootstrap
|
|
11484
|
-
*
|
|
11485
|
-
* Add the function to the `bootstrapApplication` call:
|
|
11486
|
-
* ```
|
|
11487
|
-
* import {provideHydrationSupport} from '@angular/core';
|
|
11488
|
-
*
|
|
11489
|
-
* bootstrapApplication(RootComponent, {
|
|
11490
|
-
* providers: [
|
|
11491
|
-
* // ... other providers ...
|
|
11492
|
-
* provideHydrationSupport()
|
|
11493
|
-
* ]
|
|
11494
|
-
* });
|
|
11495
|
-
* ```
|
|
11496
|
-
*
|
|
11497
|
-
* The function sets up an internal flag that would be recognized during
|
|
11498
|
-
* the server side rendering time as well, so there is no need to
|
|
11499
|
-
* configure or change anything in NgUniversal to enable the feature.
|
|
11500
|
-
*
|
|
11501
|
-
* @publicApi
|
|
11502
|
-
* @developerPreview
|
|
11503
|
-
*/
|
|
11504
|
-
export declare function ɵprovideHydrationSupport(): EnvironmentProviders;
|
|
11505
|
-
|
|
11506
|
-
export declare function ɵprovideNgZoneChangeDetection(ngZone: NgZone): StaticProvider[];
|
|
11507
|
-
|
|
11508
11216
|
/**
|
|
11509
11217
|
* Publishes a collection of default debug tools onto`window.ng`.
|
|
11510
11218
|
*
|
|
@@ -11675,7 +11383,8 @@ export declare function ɵresolveComponentResources(resourceResolver: (url: stri
|
|
|
11675
11383
|
*
|
|
11676
11384
|
* Note: the `message` argument contains a descriptive error message as a string in development
|
|
11677
11385
|
* mode (when the `ngDevMode` is defined). In production mode (after tree-shaking pass), the
|
|
11678
|
-
* `message` argument becomes `false`, thus we account for it in the typings and the runtime
|
|
11386
|
+
* `message` argument becomes `false`, thus we account for it in the typings and the runtime
|
|
11387
|
+
* logic.
|
|
11679
11388
|
*/
|
|
11680
11389
|
export declare class ɵRuntimeError<T extends number = RuntimeErrorCode> extends Error {
|
|
11681
11390
|
code: T;
|
|
@@ -12042,6 +11751,18 @@ export declare class ɵViewRef<T> implements EmbeddedViewRef<T>, InternalViewRef
|
|
|
12042
11751
|
attachToAppRef(appRef: ViewRefTracker): void;
|
|
12043
11752
|
}
|
|
12044
11753
|
|
|
11754
|
+
/**
|
|
11755
|
+
* Returns a set of providers required to setup hydration support
|
|
11756
|
+
* for an application that is server side rendered. This function is
|
|
11757
|
+
* included into the `provideClientHydration` public API function from
|
|
11758
|
+
* the `platform-browser` package.
|
|
11759
|
+
*
|
|
11760
|
+
* The function sets up an internal flag that would be recognized during
|
|
11761
|
+
* the server side rendering time as well, so there is no need to
|
|
11762
|
+
* configure or change anything in NgUniversal to enable the feature.
|
|
11763
|
+
*/
|
|
11764
|
+
export declare function ɵwithDomHydration(): EnvironmentProviders;
|
|
11765
|
+
|
|
12045
11766
|
/**
|
|
12046
11767
|
* URL for the XSS security documentation.
|
|
12047
11768
|
*/
|