@angular/core 16.0.0-next.6 → 16.0.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/index.mjs +3 -3
- package/esm2022/rxjs-interop/src/to_observable.mjs +39 -0
- package/esm2022/rxjs-interop/src/to_signal.mjs +52 -0
- package/esm2022/src/application_ref.mjs +3 -5
- package/esm2022/src/application_tokens.mjs +11 -1
- package/esm2022/src/change_detection/differs/iterable_differs.mjs +1 -1
- package/esm2022/src/core_private_export.mjs +3 -3
- package/esm2022/src/di/index.mjs +1 -4
- package/esm2022/src/errors.mjs +1 -1
- package/esm2022/src/hydration/annotate.mjs +45 -34
- package/esm2022/src/hydration/api.mjs +52 -55
- package/esm2022/src/hydration/error_handling.mjs +8 -24
- package/esm2022/src/initial_render_pending_tasks.mjs +10 -10
- package/esm2022/src/linker/query_list.mjs +1 -5
- package/esm2022/src/linker/view_ref.mjs +1 -1
- package/esm2022/src/metadata/ng_module.mjs +1 -2
- package/esm2022/src/render3/component_ref.mjs +9 -7
- package/esm2022/src/render3/di.mjs +3 -3
- package/esm2022/src/render3/hooks.mjs +35 -31
- package/esm2022/src/render3/instructions/i18n.mjs +14 -2
- package/esm2022/src/render3/instructions/mark_view_dirty.mjs +1 -1
- package/esm2022/src/render3/instructions/shared.mjs +29 -20
- package/esm2022/src/render3/interfaces/type_checks.mjs +1 -1
- package/esm2022/src/render3/interfaces/view.mjs +1 -1
- package/esm2022/src/render3/node_manipulation.mjs +9 -9
- package/esm2022/src/render3/pipe.mjs +2 -2
- package/esm2022/src/render3/reactivity/effect.mjs +1 -1
- package/esm2022/src/render3/util/discovery_utils.mjs +1 -1
- package/esm2022/src/render3/util/view_traversal_utils.mjs +1 -1
- package/esm2022/src/render3/util/view_utils.mjs +2 -2
- package/esm2022/src/render3/view_ref.mjs +4 -4
- package/esm2022/src/sanitization/url_sanitizer.mjs +7 -6
- package/esm2022/src/signals/index.mjs +4 -4
- package/esm2022/src/signals/src/graph.mjs +4 -1
- package/esm2022/src/signals/src/signal.mjs +15 -1
- package/esm2022/src/signals/src/watch.mjs +6 -2
- package/esm2022/src/signals/src/weak_ref.mjs +4 -1
- package/esm2022/src/util/decorators.mjs +6 -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/fesm2022/core.mjs +8836 -9558
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/rxjs-interop.mjs +704 -56
- package/fesm2022/rxjs-interop.mjs.map +1 -1
- package/fesm2022/testing.mjs +7918 -8641
- package/fesm2022/testing.mjs.map +1 -1
- package/index.d.ts +61 -424
- package/package.json +2 -2
- package/rxjs-interop/index.d.ts +53 -46
- 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 +5323 -3817
- package/schematics/ng-generate/standalone-migration/bundle.js.map +4 -4
- package/testing/index.d.ts +2 -2
- package/esm2022/rxjs-interop/src/from_observable.mjs +0 -46
- package/esm2022/rxjs-interop/src/from_signal.mjs +0 -36
- 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-
|
|
2
|
+
* @license Angular v16.0.0-rc.0
|
|
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
|
|
@@ -2926,24 +2933,29 @@ export declare interface DoCheck {
|
|
|
2926
2933
|
*
|
|
2927
2934
|
* @developerPreview
|
|
2928
2935
|
*/
|
|
2929
|
-
export declare function effect(effectFn: () =>
|
|
2936
|
+
export declare function effect(effectFn: (onCleanup: EffectCleanupRegisterFn) => void, options?: CreateEffectOptions): EffectRef;
|
|
2930
2937
|
|
|
2931
2938
|
/**
|
|
2932
|
-
* An effect can, optionally,
|
|
2933
|
-
* the next effect run. The cleanup function makes it possible to "cancel" any work that the
|
|
2939
|
+
* An effect can, optionally, register a cleanup function. If registered, the cleanup is executed
|
|
2940
|
+
* before the next effect run. The cleanup function makes it possible to "cancel" any work that the
|
|
2934
2941
|
* previous effect run might have started.
|
|
2935
2942
|
*
|
|
2936
2943
|
* @developerPreview
|
|
2937
2944
|
*/
|
|
2938
2945
|
export declare type EffectCleanupFn = () => void;
|
|
2939
2946
|
|
|
2947
|
+
/**
|
|
2948
|
+
* A callback passed to the effect function that makes it possible to register cleanup logic.
|
|
2949
|
+
*/
|
|
2950
|
+
declare type EffectCleanupRegisterFn = (cleanupFn: EffectCleanupFn) => void;
|
|
2951
|
+
|
|
2940
2952
|
/**
|
|
2941
2953
|
* Tracks all effects registered within a given application and runs them via `flush`.
|
|
2942
2954
|
*/
|
|
2943
2955
|
declare class EffectManager {
|
|
2944
2956
|
private all;
|
|
2945
2957
|
private queue;
|
|
2946
|
-
create(effectFn: () => void, destroyRef: DestroyRef | null, allowSignalWrites: boolean): EffectRef;
|
|
2958
|
+
create(effectFn: (onCleanup: (cleanupFn: EffectCleanupFn) => void) => void, destroyRef: DestroyRef | null, allowSignalWrites: boolean): EffectRef;
|
|
2947
2959
|
flush(): void;
|
|
2948
2960
|
get isQueueEmpty(): boolean;
|
|
2949
2961
|
/** @nocollapse */
|
|
@@ -4799,12 +4811,9 @@ export declare interface IterableDifferFactory {
|
|
|
4799
4811
|
* @publicApi
|
|
4800
4812
|
*/
|
|
4801
4813
|
export declare class IterableDiffers {
|
|
4814
|
+
private factories;
|
|
4802
4815
|
/** @nocollapse */
|
|
4803
4816
|
static ɵprov: unknown;
|
|
4804
|
-
/**
|
|
4805
|
-
* @deprecated v4.0.0 - Should be private
|
|
4806
|
-
*/
|
|
4807
|
-
factories: IterableDifferFactory[];
|
|
4808
4817
|
constructor(factories: IterableDifferFactory[]);
|
|
4809
4818
|
static create(factories: IterableDifferFactory[], parent?: IterableDiffers): IterableDiffers;
|
|
4810
4819
|
/**
|
|
@@ -5448,27 +5457,29 @@ declare const enum LViewFlags {
|
|
|
5448
5457
|
FirstLViewPass = 8,
|
|
5449
5458
|
/** Whether this view has default change detection strategy (checks always) or onPush */
|
|
5450
5459
|
CheckAlways = 16,
|
|
5460
|
+
/** Whether there are any i18n blocks inside this LView. */
|
|
5461
|
+
HasI18n = 32,
|
|
5451
5462
|
/** Whether or not this view is currently dirty (needing check) */
|
|
5452
|
-
Dirty =
|
|
5463
|
+
Dirty = 64,
|
|
5453
5464
|
/** Whether or not this view is currently attached to change detection tree. */
|
|
5454
|
-
Attached =
|
|
5465
|
+
Attached = 128,
|
|
5455
5466
|
/** Whether or not this view is destroyed. */
|
|
5456
|
-
Destroyed =
|
|
5467
|
+
Destroyed = 256,
|
|
5457
5468
|
/** Whether or not this view is the root view */
|
|
5458
|
-
IsRoot =
|
|
5469
|
+
IsRoot = 512,
|
|
5459
5470
|
/**
|
|
5460
5471
|
* Whether this moved LView was needs to be refreshed at the insertion location because the
|
|
5461
5472
|
* declaration was dirty.
|
|
5462
5473
|
*/
|
|
5463
|
-
RefreshTransplantedView =
|
|
5474
|
+
RefreshTransplantedView = 1024,
|
|
5464
5475
|
/** Indicates that the view **or any of its ancestors** have an embedded view injector. */
|
|
5465
|
-
HasEmbeddedViewInjector =
|
|
5476
|
+
HasEmbeddedViewInjector = 2048,
|
|
5466
5477
|
/**
|
|
5467
5478
|
* Index of the current init phase on last 21 bits
|
|
5468
5479
|
*/
|
|
5469
|
-
IndexWithinInitPhaseIncrementer =
|
|
5470
|
-
IndexWithinInitPhaseShift =
|
|
5471
|
-
IndexWithinInitPhaseReset =
|
|
5480
|
+
IndexWithinInitPhaseIncrementer = 4096,
|
|
5481
|
+
IndexWithinInitPhaseShift = 12,
|
|
5482
|
+
IndexWithinInitPhaseReset = 4095
|
|
5472
5483
|
}
|
|
5473
5484
|
|
|
5474
5485
|
/**
|
|
@@ -5753,7 +5764,6 @@ export declare interface NgModule {
|
|
|
5753
5764
|
|
|
5754
5765
|
/**
|
|
5755
5766
|
* @Annotation
|
|
5756
|
-
* @publicApi
|
|
5757
5767
|
*/
|
|
5758
5768
|
export declare const NgModule: NgModuleDecorator;
|
|
5759
5769
|
|
|
@@ -6690,7 +6700,8 @@ export declare class QueryList<T> implements Iterable<T> {
|
|
|
6690
6700
|
* See
|
|
6691
6701
|
* [Array.filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter)
|
|
6692
6702
|
*/
|
|
6693
|
-
filter(
|
|
6703
|
+
filter<S extends T>(predicate: (value: T, index: number, array: readonly T[]) => value is S): S[];
|
|
6704
|
+
filter(predicate: (value: T, index: number, array: readonly T[]) => unknown): T[];
|
|
6694
6705
|
/**
|
|
6695
6706
|
* See
|
|
6696
6707
|
* [Array.find](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find)
|
|
@@ -7092,291 +7103,6 @@ declare abstract class ReactiveNode {
|
|
|
7092
7103
|
*/
|
|
7093
7104
|
export declare function reflectComponentType<C>(component: Type<C>): ComponentMirror<C> | null;
|
|
7094
7105
|
|
|
7095
|
-
/**
|
|
7096
|
-
* `Dependency` is used by the framework to extend DI.
|
|
7097
|
-
* This is internal to Angular and should not be used directly.
|
|
7098
|
-
*/
|
|
7099
|
-
declare class ReflectiveDependency {
|
|
7100
|
-
key: ReflectiveKey;
|
|
7101
|
-
optional: boolean;
|
|
7102
|
-
visibility: Self | SkipSelf | null;
|
|
7103
|
-
constructor(key: ReflectiveKey, optional: boolean, visibility: Self | SkipSelf | null);
|
|
7104
|
-
static fromKey(key: ReflectiveKey): ReflectiveDependency;
|
|
7105
|
-
}
|
|
7106
|
-
|
|
7107
|
-
/**
|
|
7108
|
-
* A ReflectiveDependency injection container used for instantiating objects and resolving
|
|
7109
|
-
* dependencies.
|
|
7110
|
-
*
|
|
7111
|
-
* An `Injector` is a replacement for a `new` operator, which can automatically resolve the
|
|
7112
|
-
* constructor dependencies.
|
|
7113
|
-
*
|
|
7114
|
-
* In typical use, application code asks for the dependencies in the constructor and they are
|
|
7115
|
-
* resolved by the `Injector`.
|
|
7116
|
-
*
|
|
7117
|
-
* @usageNotes
|
|
7118
|
-
* ### Example
|
|
7119
|
-
*
|
|
7120
|
-
* The following example creates an `Injector` configured to create `Engine` and `Car`.
|
|
7121
|
-
*
|
|
7122
|
-
* ```typescript
|
|
7123
|
-
* @Injectable()
|
|
7124
|
-
* class Engine {
|
|
7125
|
-
* }
|
|
7126
|
-
*
|
|
7127
|
-
* @Injectable()
|
|
7128
|
-
* class Car {
|
|
7129
|
-
* constructor(public engine:Engine) {}
|
|
7130
|
-
* }
|
|
7131
|
-
*
|
|
7132
|
-
* var injector = ReflectiveInjector.resolveAndCreate([Car, Engine]);
|
|
7133
|
-
* var car = injector.get(Car);
|
|
7134
|
-
* expect(car instanceof Car).toBe(true);
|
|
7135
|
-
* expect(car.engine instanceof Engine).toBe(true);
|
|
7136
|
-
* ```
|
|
7137
|
-
*
|
|
7138
|
-
* Notice, we don't use the `new` operator because we explicitly want to have the `Injector`
|
|
7139
|
-
* resolve all of the object's dependencies automatically.
|
|
7140
|
-
*
|
|
7141
|
-
* TODO: delete in v14.
|
|
7142
|
-
*
|
|
7143
|
-
* @deprecated from v5 - slow and brings in a lot of code, Use `Injector.create` instead.
|
|
7144
|
-
* @publicApi
|
|
7145
|
-
*/
|
|
7146
|
-
export declare abstract class ReflectiveInjector implements Injector {
|
|
7147
|
-
/**
|
|
7148
|
-
* Turns an array of provider definitions into an array of resolved providers.
|
|
7149
|
-
*
|
|
7150
|
-
* A resolution is a process of flattening multiple nested arrays and converting individual
|
|
7151
|
-
* providers into an array of `ResolvedReflectiveProvider`s.
|
|
7152
|
-
*
|
|
7153
|
-
* @usageNotes
|
|
7154
|
-
* ### Example
|
|
7155
|
-
*
|
|
7156
|
-
* ```typescript
|
|
7157
|
-
* @Injectable()
|
|
7158
|
-
* class Engine {
|
|
7159
|
-
* }
|
|
7160
|
-
*
|
|
7161
|
-
* @Injectable()
|
|
7162
|
-
* class Car {
|
|
7163
|
-
* constructor(public engine:Engine) {}
|
|
7164
|
-
* }
|
|
7165
|
-
*
|
|
7166
|
-
* var providers = ReflectiveInjector.resolve([Car, [[Engine]]]);
|
|
7167
|
-
*
|
|
7168
|
-
* expect(providers.length).toEqual(2);
|
|
7169
|
-
*
|
|
7170
|
-
* expect(providers[0] instanceof ResolvedReflectiveProvider).toBe(true);
|
|
7171
|
-
* expect(providers[0].key.displayName).toBe("Car");
|
|
7172
|
-
* expect(providers[0].dependencies.length).toEqual(1);
|
|
7173
|
-
* expect(providers[0].factory).toBeDefined();
|
|
7174
|
-
*
|
|
7175
|
-
* expect(providers[1].key.displayName).toBe("Engine");
|
|
7176
|
-
* });
|
|
7177
|
-
* ```
|
|
7178
|
-
*
|
|
7179
|
-
*/
|
|
7180
|
-
static resolve(providers: Provider[]): ResolvedReflectiveProvider[];
|
|
7181
|
-
/**
|
|
7182
|
-
* Resolves an array of providers and creates an injector from those providers.
|
|
7183
|
-
*
|
|
7184
|
-
* The passed-in providers can be an array of `Type`, `Provider`,
|
|
7185
|
-
* or a recursive array of more providers.
|
|
7186
|
-
*
|
|
7187
|
-
* @usageNotes
|
|
7188
|
-
* ### Example
|
|
7189
|
-
*
|
|
7190
|
-
* ```typescript
|
|
7191
|
-
* @Injectable()
|
|
7192
|
-
* class Engine {
|
|
7193
|
-
* }
|
|
7194
|
-
*
|
|
7195
|
-
* @Injectable()
|
|
7196
|
-
* class Car {
|
|
7197
|
-
* constructor(public engine:Engine) {}
|
|
7198
|
-
* }
|
|
7199
|
-
*
|
|
7200
|
-
* var injector = ReflectiveInjector.resolveAndCreate([Car, Engine]);
|
|
7201
|
-
* expect(injector.get(Car) instanceof Car).toBe(true);
|
|
7202
|
-
* ```
|
|
7203
|
-
*/
|
|
7204
|
-
static resolveAndCreate(providers: Provider[], parent?: Injector): ReflectiveInjector;
|
|
7205
|
-
/**
|
|
7206
|
-
* Creates an injector from previously resolved providers.
|
|
7207
|
-
*
|
|
7208
|
-
* This API is the recommended way to construct injectors in performance-sensitive parts.
|
|
7209
|
-
*
|
|
7210
|
-
* @usageNotes
|
|
7211
|
-
* ### Example
|
|
7212
|
-
*
|
|
7213
|
-
* ```typescript
|
|
7214
|
-
* @Injectable()
|
|
7215
|
-
* class Engine {
|
|
7216
|
-
* }
|
|
7217
|
-
*
|
|
7218
|
-
* @Injectable()
|
|
7219
|
-
* class Car {
|
|
7220
|
-
* constructor(public engine:Engine) {}
|
|
7221
|
-
* }
|
|
7222
|
-
*
|
|
7223
|
-
* var providers = ReflectiveInjector.resolve([Car, Engine]);
|
|
7224
|
-
* var injector = ReflectiveInjector.fromResolvedProviders(providers);
|
|
7225
|
-
* expect(injector.get(Car) instanceof Car).toBe(true);
|
|
7226
|
-
* ```
|
|
7227
|
-
*/
|
|
7228
|
-
static fromResolvedProviders(providers: ResolvedReflectiveProvider[], parent?: Injector): ReflectiveInjector;
|
|
7229
|
-
/**
|
|
7230
|
-
* Parent of this injector.
|
|
7231
|
-
*
|
|
7232
|
-
* <!-- TODO: Add a link to the section of the user guide talking about hierarchical injection.
|
|
7233
|
-
* -->
|
|
7234
|
-
*/
|
|
7235
|
-
abstract get parent(): Injector | null;
|
|
7236
|
-
/**
|
|
7237
|
-
* Resolves an array of providers and creates a child injector from those providers.
|
|
7238
|
-
*
|
|
7239
|
-
* <!-- TODO: Add a link to the section of the user guide talking about hierarchical injection.
|
|
7240
|
-
* -->
|
|
7241
|
-
*
|
|
7242
|
-
* The passed-in providers can be an array of `Type`, `Provider`,
|
|
7243
|
-
* or a recursive array of more providers.
|
|
7244
|
-
*
|
|
7245
|
-
* @usageNotes
|
|
7246
|
-
* ### Example
|
|
7247
|
-
*
|
|
7248
|
-
* ```typescript
|
|
7249
|
-
* class ParentProvider {}
|
|
7250
|
-
* class ChildProvider {}
|
|
7251
|
-
*
|
|
7252
|
-
* var parent = ReflectiveInjector.resolveAndCreate([ParentProvider]);
|
|
7253
|
-
* var child = parent.resolveAndCreateChild([ChildProvider]);
|
|
7254
|
-
*
|
|
7255
|
-
* expect(child.get(ParentProvider) instanceof ParentProvider).toBe(true);
|
|
7256
|
-
* expect(child.get(ChildProvider) instanceof ChildProvider).toBe(true);
|
|
7257
|
-
* expect(child.get(ParentProvider)).toBe(parent.get(ParentProvider));
|
|
7258
|
-
* ```
|
|
7259
|
-
*/
|
|
7260
|
-
abstract resolveAndCreateChild(providers: Provider[]): ReflectiveInjector;
|
|
7261
|
-
/**
|
|
7262
|
-
* Creates a child injector from previously resolved providers.
|
|
7263
|
-
*
|
|
7264
|
-
* <!-- TODO: Add a link to the section of the user guide talking about hierarchical injection.
|
|
7265
|
-
* -->
|
|
7266
|
-
*
|
|
7267
|
-
* This API is the recommended way to construct injectors in performance-sensitive parts.
|
|
7268
|
-
*
|
|
7269
|
-
* @usageNotes
|
|
7270
|
-
* ### Example
|
|
7271
|
-
*
|
|
7272
|
-
* ```typescript
|
|
7273
|
-
* class ParentProvider {}
|
|
7274
|
-
* class ChildProvider {}
|
|
7275
|
-
*
|
|
7276
|
-
* var parentProviders = ReflectiveInjector.resolve([ParentProvider]);
|
|
7277
|
-
* var childProviders = ReflectiveInjector.resolve([ChildProvider]);
|
|
7278
|
-
*
|
|
7279
|
-
* var parent = ReflectiveInjector.fromResolvedProviders(parentProviders);
|
|
7280
|
-
* var child = parent.createChildFromResolved(childProviders);
|
|
7281
|
-
*
|
|
7282
|
-
* expect(child.get(ParentProvider) instanceof ParentProvider).toBe(true);
|
|
7283
|
-
* expect(child.get(ChildProvider) instanceof ChildProvider).toBe(true);
|
|
7284
|
-
* expect(child.get(ParentProvider)).toBe(parent.get(ParentProvider));
|
|
7285
|
-
* ```
|
|
7286
|
-
*/
|
|
7287
|
-
abstract createChildFromResolved(providers: ResolvedReflectiveProvider[]): ReflectiveInjector;
|
|
7288
|
-
/**
|
|
7289
|
-
* Resolves a provider and instantiates an object in the context of the injector.
|
|
7290
|
-
*
|
|
7291
|
-
* The created object does not get cached by the injector.
|
|
7292
|
-
*
|
|
7293
|
-
* @usageNotes
|
|
7294
|
-
* ### Example
|
|
7295
|
-
*
|
|
7296
|
-
* ```typescript
|
|
7297
|
-
* @Injectable()
|
|
7298
|
-
* class Engine {
|
|
7299
|
-
* }
|
|
7300
|
-
*
|
|
7301
|
-
* @Injectable()
|
|
7302
|
-
* class Car {
|
|
7303
|
-
* constructor(public engine:Engine) {}
|
|
7304
|
-
* }
|
|
7305
|
-
*
|
|
7306
|
-
* var injector = ReflectiveInjector.resolveAndCreate([Engine]);
|
|
7307
|
-
*
|
|
7308
|
-
* var car = injector.resolveAndInstantiate(Car);
|
|
7309
|
-
* expect(car.engine).toBe(injector.get(Engine));
|
|
7310
|
-
* expect(car).not.toBe(injector.resolveAndInstantiate(Car));
|
|
7311
|
-
* ```
|
|
7312
|
-
*/
|
|
7313
|
-
abstract resolveAndInstantiate(provider: Provider): any;
|
|
7314
|
-
/**
|
|
7315
|
-
* Instantiates an object using a resolved provider in the context of the injector.
|
|
7316
|
-
*
|
|
7317
|
-
* The created object does not get cached by the injector.
|
|
7318
|
-
*
|
|
7319
|
-
* @usageNotes
|
|
7320
|
-
* ### Example
|
|
7321
|
-
*
|
|
7322
|
-
* ```typescript
|
|
7323
|
-
* @Injectable()
|
|
7324
|
-
* class Engine {
|
|
7325
|
-
* }
|
|
7326
|
-
*
|
|
7327
|
-
* @Injectable()
|
|
7328
|
-
* class Car {
|
|
7329
|
-
* constructor(public engine:Engine) {}
|
|
7330
|
-
* }
|
|
7331
|
-
*
|
|
7332
|
-
* var injector = ReflectiveInjector.resolveAndCreate([Engine]);
|
|
7333
|
-
* var carProvider = ReflectiveInjector.resolve([Car])[0];
|
|
7334
|
-
* var car = injector.instantiateResolved(carProvider);
|
|
7335
|
-
* expect(car.engine).toBe(injector.get(Engine));
|
|
7336
|
-
* expect(car).not.toBe(injector.instantiateResolved(carProvider));
|
|
7337
|
-
* ```
|
|
7338
|
-
*/
|
|
7339
|
-
abstract instantiateResolved(provider: ResolvedReflectiveProvider): any;
|
|
7340
|
-
abstract get(token: any, notFoundValue?: any): any;
|
|
7341
|
-
}
|
|
7342
|
-
|
|
7343
|
-
|
|
7344
|
-
/**
|
|
7345
|
-
* A unique object used for retrieving items from the {@link ReflectiveInjector}.
|
|
7346
|
-
*
|
|
7347
|
-
* Keys have:
|
|
7348
|
-
* - a system-wide unique `id`.
|
|
7349
|
-
* - a `token`.
|
|
7350
|
-
*
|
|
7351
|
-
* `Key` is used internally by {@link ReflectiveInjector} because its system-wide unique `id` allows
|
|
7352
|
-
* the
|
|
7353
|
-
* injector to store created objects in a more efficient way.
|
|
7354
|
-
*
|
|
7355
|
-
* `Key` should not be created directly. {@link ReflectiveInjector} creates keys automatically when
|
|
7356
|
-
* resolving
|
|
7357
|
-
* providers.
|
|
7358
|
-
*
|
|
7359
|
-
* @deprecated No replacement
|
|
7360
|
-
* @publicApi
|
|
7361
|
-
*/
|
|
7362
|
-
export declare class ReflectiveKey {
|
|
7363
|
-
token: Object;
|
|
7364
|
-
id: number;
|
|
7365
|
-
readonly displayName: string;
|
|
7366
|
-
/**
|
|
7367
|
-
* Private
|
|
7368
|
-
*/
|
|
7369
|
-
constructor(token: Object, id: number);
|
|
7370
|
-
/**
|
|
7371
|
-
* Retrieves a `Key` for a token.
|
|
7372
|
-
*/
|
|
7373
|
-
static get(token: Object): ReflectiveKey;
|
|
7374
|
-
/**
|
|
7375
|
-
* @returns the number of keys registered in the system.
|
|
7376
|
-
*/
|
|
7377
|
-
static get numberOfKeys(): number;
|
|
7378
|
-
}
|
|
7379
|
-
|
|
7380
7106
|
/**
|
|
7381
7107
|
* Subset of API needed for writing attributes, properties, and setting up
|
|
7382
7108
|
* listeners on Element.
|
|
@@ -7693,64 +7419,6 @@ export declare interface RendererType2 {
|
|
|
7693
7419
|
};
|
|
7694
7420
|
}
|
|
7695
7421
|
|
|
7696
|
-
/**
|
|
7697
|
-
* An internal resolved representation of a factory function created by resolving `Provider`.
|
|
7698
|
-
* @publicApi
|
|
7699
|
-
*/
|
|
7700
|
-
export declare class ResolvedReflectiveFactory {
|
|
7701
|
-
/**
|
|
7702
|
-
* Factory function which can return an instance of an object represented by a key.
|
|
7703
|
-
*/
|
|
7704
|
-
factory: Function;
|
|
7705
|
-
/**
|
|
7706
|
-
* Arguments (dependencies) to the `factory` function.
|
|
7707
|
-
*/
|
|
7708
|
-
dependencies: ReflectiveDependency[];
|
|
7709
|
-
constructor(
|
|
7710
|
-
/**
|
|
7711
|
-
* Factory function which can return an instance of an object represented by a key.
|
|
7712
|
-
*/
|
|
7713
|
-
factory: Function,
|
|
7714
|
-
/**
|
|
7715
|
-
* Arguments (dependencies) to the `factory` function.
|
|
7716
|
-
*/
|
|
7717
|
-
dependencies: ReflectiveDependency[]);
|
|
7718
|
-
}
|
|
7719
|
-
|
|
7720
|
-
/**
|
|
7721
|
-
* An internal resolved representation of a `Provider` used by the `Injector`.
|
|
7722
|
-
*
|
|
7723
|
-
* @usageNotes
|
|
7724
|
-
* This is usually created automatically by `Injector.resolveAndCreate`.
|
|
7725
|
-
*
|
|
7726
|
-
* It can be created manually, as follows:
|
|
7727
|
-
*
|
|
7728
|
-
* ### Example
|
|
7729
|
-
*
|
|
7730
|
-
* ```typescript
|
|
7731
|
-
* var resolvedProviders = Injector.resolve([{ provide: 'message', useValue: 'Hello' }]);
|
|
7732
|
-
* var injector = Injector.fromResolvedProviders(resolvedProviders);
|
|
7733
|
-
*
|
|
7734
|
-
* expect(injector.get('message')).toEqual('Hello');
|
|
7735
|
-
* ```
|
|
7736
|
-
*
|
|
7737
|
-
* @publicApi
|
|
7738
|
-
*/
|
|
7739
|
-
export declare interface ResolvedReflectiveProvider {
|
|
7740
|
-
/**
|
|
7741
|
-
* A key, usually a `Type<any>`.
|
|
7742
|
-
*/
|
|
7743
|
-
key: ReflectiveKey;
|
|
7744
|
-
/**
|
|
7745
|
-
* Factory function which can return an instance of an object represented by a key.
|
|
7746
|
-
*/
|
|
7747
|
-
resolvedFactories: ResolvedReflectiveFactory[];
|
|
7748
|
-
/**
|
|
7749
|
-
* Indicates if the provider is a multi-provider or a regular provider.
|
|
7750
|
-
*/
|
|
7751
|
-
multiProvider: boolean;
|
|
7752
|
-
}
|
|
7753
|
-
|
|
7754
7422
|
/**
|
|
7755
7423
|
* Lazily retrieves the reference value from a forwardRef.
|
|
7756
7424
|
*
|
|
@@ -7869,13 +7537,14 @@ declare const enum RuntimeErrorCode {
|
|
|
7869
7537
|
ASYNC_INITIALIZERS_STILL_RUNNING = 405,
|
|
7870
7538
|
APPLICATION_REF_ALREADY_DESTROYED = 406,
|
|
7871
7539
|
RENDERER_NOT_FOUND = 407,
|
|
7872
|
-
HYDRATION_NODE_MISMATCH = 500,
|
|
7873
|
-
HYDRATION_MISSING_SIBLINGS = 501,
|
|
7874
|
-
HYDRATION_MISSING_NODE = 502,
|
|
7875
|
-
UNSUPPORTED_PROJECTION_DOM_NODES = 503,
|
|
7876
|
-
INVALID_SKIP_HYDRATION_HOST = 504,
|
|
7877
|
-
|
|
7540
|
+
HYDRATION_NODE_MISMATCH = -500,
|
|
7541
|
+
HYDRATION_MISSING_SIBLINGS = -501,
|
|
7542
|
+
HYDRATION_MISSING_NODE = -502,
|
|
7543
|
+
UNSUPPORTED_PROJECTION_DOM_NODES = -503,
|
|
7544
|
+
INVALID_SKIP_HYDRATION_HOST = -504,
|
|
7545
|
+
MISSING_HYDRATION_ANNOTATIONS = -505,
|
|
7878
7546
|
SIGNAL_WRITE_FROM_ILLEGAL_CONTEXT = 600,
|
|
7547
|
+
REQUIRE_SYNC_WITHOUT_SYNC_EMIT = 601,
|
|
7879
7548
|
INVALID_I18N_STRUCTURE = 700,
|
|
7880
7549
|
MISSING_LOCALE_DATA = 701,
|
|
7881
7550
|
IMPORT_PROVIDERS_FROM_STANDALONE = 800,
|
|
@@ -9875,6 +9544,7 @@ export declare interface TypeDecorator {
|
|
|
9875
9544
|
*/
|
|
9876
9545
|
<T extends Type<any>>(type: T): T;
|
|
9877
9546
|
(target: Object, propertyKey?: string | symbol, parameterIndex?: number): void;
|
|
9547
|
+
(target: unknown, context: unknown): void;
|
|
9878
9548
|
}
|
|
9879
9549
|
|
|
9880
9550
|
declare type TypeOrFactory<T> = T | (() => T);
|
|
@@ -10370,7 +10040,7 @@ export declare abstract class ViewRef extends ChangeDetectorRef {
|
|
|
10370
10040
|
* @param callback A handler function that cleans up developer-defined data
|
|
10371
10041
|
* associated with a view. Called when the `destroy()` method is invoked.
|
|
10372
10042
|
*/
|
|
10373
|
-
abstract onDestroy(callback: Function):
|
|
10043
|
+
abstract onDestroy(callback: Function): void;
|
|
10374
10044
|
}
|
|
10375
10045
|
|
|
10376
10046
|
/**
|
|
@@ -10383,7 +10053,6 @@ declare interface ViewRefTracker {
|
|
|
10383
10053
|
detachView(viewRef: ViewRef): void;
|
|
10384
10054
|
}
|
|
10385
10055
|
|
|
10386
|
-
|
|
10387
10056
|
declare interface WeakRef<T extends object> {
|
|
10388
10057
|
deref(): T | undefined;
|
|
10389
10058
|
}
|
|
@@ -10998,6 +10667,14 @@ export declare interface ɵDirectiveType<T> extends Type<T> {
|
|
|
10998
10667
|
ɵfac: unknown;
|
|
10999
10668
|
}
|
|
11000
10669
|
|
|
10670
|
+
/**
|
|
10671
|
+
* Internal token to collect all SSR-related features enabled for this application.
|
|
10672
|
+
*
|
|
10673
|
+
* Note: the token is in `core` to let other packages register features (the `core`
|
|
10674
|
+
* package is imported in other packages).
|
|
10675
|
+
*/
|
|
10676
|
+
export declare const ɵENABLED_SSR_FEATURES: InjectionToken<Set<string>>;
|
|
10677
|
+
|
|
11001
10678
|
|
|
11002
10679
|
export declare function ɵescapeTransferStateContent(text: string): string;
|
|
11003
10680
|
|
|
@@ -11159,6 +10836,7 @@ export declare class ɵInitialRenderPendingTasks implements OnDestroy {
|
|
|
11159
10836
|
add(): number;
|
|
11160
10837
|
remove(taskId: number): void;
|
|
11161
10838
|
ngOnDestroy(): void;
|
|
10839
|
+
private complete;
|
|
11162
10840
|
static ɵfac: i0.ɵɵFactoryDeclaration<ɵInitialRenderPendingTasks, never>;
|
|
11163
10841
|
static ɵprov: i0.ɵɵInjectableDeclaration<ɵInitialRenderPendingTasks>;
|
|
11164
10842
|
}
|
|
@@ -11323,15 +11001,6 @@ export declare enum ɵLocaleDataIndex {
|
|
|
11323
11001
|
ExtraData = 21
|
|
11324
11002
|
}
|
|
11325
11003
|
|
|
11326
|
-
/**
|
|
11327
|
-
* @suppress {globalThis}
|
|
11328
|
-
*/
|
|
11329
|
-
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): {
|
|
11330
|
-
new (...args: any[]): any;
|
|
11331
|
-
(...args: any[]): any;
|
|
11332
|
-
(...args: any[]): (cls: any) => any;
|
|
11333
|
-
};
|
|
11334
|
-
|
|
11335
11004
|
|
|
11336
11005
|
export declare const ɵNG_COMP_DEF: string;
|
|
11337
11006
|
|
|
@@ -11561,50 +11230,6 @@ export declare const enum ɵProfilerEvent {
|
|
|
11561
11230
|
OutputEnd = 7
|
|
11562
11231
|
}
|
|
11563
11232
|
|
|
11564
|
-
/**
|
|
11565
|
-
* Returns a set of providers required to setup hydration support
|
|
11566
|
-
* for an application that is server side rendered.
|
|
11567
|
-
*
|
|
11568
|
-
* ## NgModule-based bootstrap
|
|
11569
|
-
*
|
|
11570
|
-
* You can add the function call to the root AppModule of an application:
|
|
11571
|
-
* ```
|
|
11572
|
-
* import {provideHydrationSupport} from '@angular/core';
|
|
11573
|
-
*
|
|
11574
|
-
* @NgModule({
|
|
11575
|
-
* providers: [
|
|
11576
|
-
* // ... other providers ...
|
|
11577
|
-
* provideHydrationSupport()
|
|
11578
|
-
* ],
|
|
11579
|
-
* declarations: [AppComponent],
|
|
11580
|
-
* bootstrap: [AppComponent]
|
|
11581
|
-
* })
|
|
11582
|
-
* class AppModule {}
|
|
11583
|
-
* ```
|
|
11584
|
-
*
|
|
11585
|
-
* ## Standalone-based bootstrap
|
|
11586
|
-
*
|
|
11587
|
-
* Add the function to the `bootstrapApplication` call:
|
|
11588
|
-
* ```
|
|
11589
|
-
* import {provideHydrationSupport} from '@angular/core';
|
|
11590
|
-
*
|
|
11591
|
-
* bootstrapApplication(RootComponent, {
|
|
11592
|
-
* providers: [
|
|
11593
|
-
* // ... other providers ...
|
|
11594
|
-
* provideHydrationSupport()
|
|
11595
|
-
* ]
|
|
11596
|
-
* });
|
|
11597
|
-
* ```
|
|
11598
|
-
*
|
|
11599
|
-
* The function sets up an internal flag that would be recognized during
|
|
11600
|
-
* the server side rendering time as well, so there is no need to
|
|
11601
|
-
* configure or change anything in NgUniversal to enable the feature.
|
|
11602
|
-
*
|
|
11603
|
-
* @publicApi
|
|
11604
|
-
* @developerPreview
|
|
11605
|
-
*/
|
|
11606
|
-
export declare function ɵprovideHydrationSupport(): EnvironmentProviders;
|
|
11607
|
-
|
|
11608
11233
|
/**
|
|
11609
11234
|
* Publishes a collection of default debug tools onto`window.ng`.
|
|
11610
11235
|
*
|
|
@@ -12143,6 +11768,18 @@ export declare class ɵViewRef<T> implements EmbeddedViewRef<T>, InternalViewRef
|
|
|
12143
11768
|
attachToAppRef(appRef: ViewRefTracker): void;
|
|
12144
11769
|
}
|
|
12145
11770
|
|
|
11771
|
+
/**
|
|
11772
|
+
* Returns a set of providers required to setup hydration support
|
|
11773
|
+
* for an application that is server side rendered. This function is
|
|
11774
|
+
* included into the `provideClientHydration` public API function from
|
|
11775
|
+
* the `platform-browser` package.
|
|
11776
|
+
*
|
|
11777
|
+
* The function sets up an internal flag that would be recognized during
|
|
11778
|
+
* the server side rendering time as well, so there is no need to
|
|
11779
|
+
* configure or change anything in NgUniversal to enable the feature.
|
|
11780
|
+
*/
|
|
11781
|
+
export declare function ɵwithDomHydration(): EnvironmentProviders;
|
|
11782
|
+
|
|
12146
11783
|
/**
|
|
12147
11784
|
* URL for the XSS security documentation.
|
|
12148
11785
|
*/
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/core",
|
|
3
|
-
"version": "16.0.0-
|
|
3
|
+
"version": "16.0.0-rc.0",
|
|
4
4
|
"description": "Angular - the core framework",
|
|
5
5
|
"author": "angular",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"engines": {
|
|
8
|
-
"node": "^16.
|
|
8
|
+
"node": "^16.14.0 || >=18.10.0"
|
|
9
9
|
},
|
|
10
10
|
"exports": {
|
|
11
11
|
"./schematics/*": {
|