@angular/core 16.2.0-next.1 → 16.2.0-next.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/rxjs-interop/src/take_until_destroyed.mjs +3 -3
- package/esm2022/rxjs-interop/src/to_observable.mjs +1 -1
- package/esm2022/rxjs-interop/src/to_signal.mjs +1 -1
- package/esm2022/src/di/contextual.mjs +10 -7
- package/esm2022/src/di/injection_token.mjs +2 -2
- package/esm2022/src/di/injector_compatibility.mjs +4 -3
- package/esm2022/src/di/interface/defs.mjs +3 -2
- package/esm2022/src/di/interface/injector.mjs +2 -2
- package/esm2022/src/di/provider_collection.mjs +2 -2
- package/esm2022/src/di/r3_injector.mjs +1 -1
- package/esm2022/src/errors.mjs +1 -1
- package/esm2022/src/linker/template_ref.mjs +1 -1
- package/esm2022/src/render3/assert.mjs +8 -3
- package/esm2022/src/render3/deps_tracker/api.mjs +1 -1
- package/esm2022/src/render3/deps_tracker/deps_tracker.mjs +216 -12
- package/esm2022/src/render3/features/standalone_feature.mjs +4 -4
- package/esm2022/src/render3/jit/directive.mjs +2 -2
- package/esm2022/src/render3/jit/util.mjs +11 -2
- package/esm2022/src/render3/pipe.mjs +26 -2
- package/esm2022/src/render3/reactivity/effect.mjs +1 -1
- package/esm2022/src/signals/src/graph.mjs +7 -3
- package/esm2022/src/util/global.mjs +2 -10
- package/esm2022/src/util/raf.mjs +20 -5
- package/esm2022/src/version.mjs +1 -1
- package/esm2022/src/zone/ng_zone.mjs +10 -1
- package/esm2022/testing/src/logger.mjs +3 -3
- package/esm2022/testing/src/test_hooks.mjs +3 -8
- package/fesm2022/core.mjs +97 -34
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/rxjs-interop.mjs +10 -14
- package/fesm2022/rxjs-interop.mjs.map +1 -1
- package/fesm2022/testing.mjs +85 -51
- package/fesm2022/testing.mjs.map +1 -1
- package/index.d.ts +35 -19
- package/package.json +1 -1
- package/rxjs-interop/index.d.ts +15 -12
- package/schematics/ng-generate/standalone-migration/bundle.js +1861 -410
- 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-next.
|
|
2
|
+
* @license Angular v16.2.0-next.3
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -545,7 +545,8 @@ export declare class ApplicationRef {
|
|
|
545
545
|
export declare function asNativeElements(debugEls: DebugElement[]): any;
|
|
546
546
|
|
|
547
547
|
/**
|
|
548
|
-
* Asserts that the current stack frame is within an injection
|
|
548
|
+
* Asserts that the current stack frame is within an [injection
|
|
549
|
+
* context](guide/dependency-injection-context) and has access to `inject`.
|
|
549
550
|
*
|
|
550
551
|
* @param debugFn a reference to the function making the assertion (used for the error message).
|
|
551
552
|
*
|
|
@@ -1855,7 +1856,8 @@ export declare interface CreateEffectOptions {
|
|
|
1855
1856
|
/**
|
|
1856
1857
|
* The `Injector` in which to create the effect.
|
|
1857
1858
|
*
|
|
1858
|
-
* If this is not provided, the current injection context
|
|
1859
|
+
* If this is not provided, the current [injection context](guide/dependency-injection-context)
|
|
1860
|
+
* will be used instead (via `inject`).
|
|
1859
1861
|
*/
|
|
1860
1862
|
injector?: Injector;
|
|
1861
1863
|
/**
|
|
@@ -3185,9 +3187,9 @@ export declare abstract class EnvironmentInjector implements Injector {
|
|
|
3185
3187
|
/**
|
|
3186
3188
|
* Runs the given function in the context of this `EnvironmentInjector`.
|
|
3187
3189
|
*
|
|
3188
|
-
* Within the function's stack frame, `inject` can be used to inject
|
|
3189
|
-
* injector. Note that `inject` is only usable synchronously, and cannot be
|
|
3190
|
-
* asynchronous callbacks or after any `await` points.
|
|
3190
|
+
* Within the function's stack frame, [`inject`](api/core/inject) can be used to inject
|
|
3191
|
+
* dependencies from this injector. Note that `inject` is only usable synchronously, and cannot be
|
|
3192
|
+
* used in any asynchronous callbacks or after any `await` points.
|
|
3191
3193
|
*
|
|
3192
3194
|
* @param fn the closure to be run in the context of this injector
|
|
3193
3195
|
* @returns the return value of the function, if any
|
|
@@ -4406,7 +4408,7 @@ export declare interface InjectDecorator {
|
|
|
4406
4408
|
* Injection flags for DI.
|
|
4407
4409
|
*
|
|
4408
4410
|
* @publicApi
|
|
4409
|
-
* @deprecated use an options object for `inject` instead.
|
|
4411
|
+
* @deprecated use an options object for [`inject`](api/core/inject) instead.
|
|
4410
4412
|
*/
|
|
4411
4413
|
export declare enum InjectFlags {
|
|
4412
4414
|
/** Check self and check parent injector if needed */
|
|
@@ -4444,7 +4446,7 @@ export declare enum InjectFlags {
|
|
|
4444
4446
|
* (possibly by creating) a default value of the parameterized type `T`. This sets up the
|
|
4445
4447
|
* `InjectionToken` using this factory as a provider as if it was defined explicitly in the
|
|
4446
4448
|
* application's root injector. If the factory function, which takes zero arguments, needs to inject
|
|
4447
|
-
* dependencies, it can do so using the `inject` function.
|
|
4449
|
+
* dependencies, it can do so using the [`inject`](api/core/inject) function.
|
|
4448
4450
|
* As you can see in the Tree-shakable InjectionToken example below.
|
|
4449
4451
|
*
|
|
4450
4452
|
* Additionally, if a `factory` is specified you can also specify the `providedIn` option, which
|
|
@@ -4485,7 +4487,7 @@ export declare class InjectionToken<T> {
|
|
|
4485
4487
|
}
|
|
4486
4488
|
|
|
4487
4489
|
/**
|
|
4488
|
-
* Type of the options argument to `inject
|
|
4490
|
+
* Type of the options argument to [`inject`](api/core/inject).
|
|
4489
4491
|
*
|
|
4490
4492
|
* @publicApi
|
|
4491
4493
|
*/
|
|
@@ -5553,7 +5555,7 @@ declare const enum LViewFlags {
|
|
|
5553
5555
|
|
|
5554
5556
|
/**
|
|
5555
5557
|
* Wrap an array of `Provider`s into `EnvironmentProviders`, preventing them from being accidentally
|
|
5556
|
-
* referenced in `@Component in a component injector.
|
|
5558
|
+
* referenced in `@Component` in a component injector.
|
|
5557
5559
|
*/
|
|
5558
5560
|
export declare function makeEnvironmentProviders(providers: (Provider | EnvironmentProviders)[]): EnvironmentProviders;
|
|
5559
5561
|
|
|
@@ -6033,8 +6035,17 @@ export declare class NgZone {
|
|
|
6033
6035
|
shouldCoalesceEventChangeDetection?: boolean | undefined;
|
|
6034
6036
|
shouldCoalesceRunChangeDetection?: boolean | undefined;
|
|
6035
6037
|
});
|
|
6038
|
+
/**
|
|
6039
|
+
This method checks whether the method call happens within an Angular Zone instance.
|
|
6040
|
+
*/
|
|
6036
6041
|
static isInAngularZone(): boolean;
|
|
6042
|
+
/**
|
|
6043
|
+
Assures that the method is called within the Angular Zone, otherwise throws an error.
|
|
6044
|
+
*/
|
|
6037
6045
|
static assertInAngularZone(): void;
|
|
6046
|
+
/**
|
|
6047
|
+
Assures that the method is called outside of the Angular Zone, otherwise throws an error.
|
|
6048
|
+
*/
|
|
6038
6049
|
static assertNotInAngularZone(): void;
|
|
6039
6050
|
/**
|
|
6040
6051
|
* Executes the `fn` function synchronously within the Angular zone and returns value returned by
|
|
@@ -7578,13 +7589,15 @@ declare interface RText extends RNode {
|
|
|
7578
7589
|
}
|
|
7579
7590
|
|
|
7580
7591
|
/**
|
|
7581
|
-
* Runs the given function in the context of the given
|
|
7592
|
+
* Runs the given function in the [context](guide/dependency-injection-context) of the given
|
|
7593
|
+
* `Injector`.
|
|
7582
7594
|
*
|
|
7583
|
-
* Within the function's stack frame, `inject` can be used to inject dependencies
|
|
7584
|
-
* `Injector`. Note that `inject` is only usable synchronously, and cannot be used in
|
|
7585
|
-
* asynchronous callbacks or after any `await` points.
|
|
7595
|
+
* Within the function's stack frame, [`inject`](api/core/inject) can be used to inject dependencies
|
|
7596
|
+
* from the given `Injector`. Note that `inject` is only usable synchronously, and cannot be used in
|
|
7597
|
+
* any asynchronous callbacks or after any `await` points.
|
|
7586
7598
|
*
|
|
7587
|
-
* @param injector the injector which will satisfy calls to `inject` while `fn`
|
|
7599
|
+
* @param injector the injector which will satisfy calls to [`inject`](api/core/inject) while `fn`
|
|
7600
|
+
* is executing
|
|
7588
7601
|
* @param fn the closure to be run in the context of `injector`
|
|
7589
7602
|
* @returns the return value of the function, if any
|
|
7590
7603
|
* @publicApi
|
|
@@ -7636,6 +7649,7 @@ declare const enum RuntimeErrorCode {
|
|
|
7636
7649
|
HOST_DIRECTIVE_COMPONENT = 310,
|
|
7637
7650
|
HOST_DIRECTIVE_UNDEFINED_BINDING = 311,
|
|
7638
7651
|
HOST_DIRECTIVE_CONFLICTING_ALIAS = 312,
|
|
7652
|
+
MULTIPLE_MATCHING_PIPES = 313,
|
|
7639
7653
|
MULTIPLE_PLATFORMS = 400,
|
|
7640
7654
|
PLATFORM_NOT_FOUND = 401,
|
|
7641
7655
|
MISSING_REQUIRED_INJECTABLE_IN_BOOTSTRAP = 402,
|
|
@@ -7668,7 +7682,8 @@ declare const enum RuntimeErrorCode {
|
|
|
7668
7682
|
UNEXPECTED_ZONE_STATE = 909,
|
|
7669
7683
|
UNSAFE_IFRAME_ATTRS = -910,
|
|
7670
7684
|
VIEW_ALREADY_DESTROYED = 911,
|
|
7671
|
-
COMPONENT_ID_COLLISION = -912
|
|
7685
|
+
COMPONENT_ID_COLLISION = -912,
|
|
7686
|
+
RUNTIME_DEPS_INVALID_IMPORTED_TYPE = 1000
|
|
7672
7687
|
}
|
|
7673
7688
|
|
|
7674
7689
|
/**
|
|
@@ -8195,8 +8210,8 @@ export declare abstract class TemplateRef<C> {
|
|
|
8195
8210
|
/**
|
|
8196
8211
|
* The anchor element in the parent view for this embedded view.
|
|
8197
8212
|
*
|
|
8198
|
-
* The data-binding and injection contexts of embedded views
|
|
8199
|
-
* inherit from the contexts of this location.
|
|
8213
|
+
* The data-binding and [injection contexts](guide/dependency-injection-context) of embedded views
|
|
8214
|
+
* created from this `TemplateRef` inherit from the contexts of this location.
|
|
8200
8215
|
*
|
|
8201
8216
|
* Typically new embedded views are attached to the view container of this location, but in
|
|
8202
8217
|
* advanced use-cases, the view can be attached to a different container while keeping the
|
|
@@ -12654,7 +12669,8 @@ export declare function ɵɵdefineDirective<T>(directiveDefinition: DirectiveDef
|
|
|
12654
12669
|
* with an `@NgModule` or other `InjectorType`, or by specifying that this injectable should be
|
|
12655
12670
|
* provided in the `'root'` injector, which will be the application-level injector in most apps.
|
|
12656
12671
|
* * `factory` gives the zero argument function which will create an instance of the injectable.
|
|
12657
|
-
* The factory can call `inject` to access the `Injector` and request injection
|
|
12672
|
+
* The factory can call [`inject`](api/core/inject) to access the `Injector` and request injection
|
|
12673
|
+
* of dependencies.
|
|
12658
12674
|
*
|
|
12659
12675
|
* @codeGenApi
|
|
12660
12676
|
* @publicApi This instruction has been emitted by ViewEngine for some time and is deployed to npm.
|
package/package.json
CHANGED
package/rxjs-interop/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v16.2.0-next.
|
|
2
|
+
* @license Angular v16.2.0-next.3
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -17,8 +17,8 @@ import { Subscribable } from 'rxjs';
|
|
|
17
17
|
* etc) is destroyed.
|
|
18
18
|
*
|
|
19
19
|
* @param destroyRef optionally, the `DestroyRef` representing the current context. This can be
|
|
20
|
-
* passed explicitly to use `takeUntilDestroyed` outside of an injection
|
|
21
|
-
* current `DestroyRef` is injected.
|
|
20
|
+
* passed explicitly to use `takeUntilDestroyed` outside of an [injection
|
|
21
|
+
* context](guide/dependency-injection-context). Otherwise, the current `DestroyRef` is injected.
|
|
22
22
|
*
|
|
23
23
|
* @developerPreview
|
|
24
24
|
*/
|
|
@@ -44,7 +44,8 @@ export declare interface ToObservableOptions {
|
|
|
44
44
|
/**
|
|
45
45
|
* The `Injector` to use when creating the underlying `effect` which watches the signal.
|
|
46
46
|
*
|
|
47
|
-
* If this isn't specified, the current injection context
|
|
47
|
+
* If this isn't specified, the current [injection context](guide/dependency-injection-context)
|
|
48
|
+
* will be used.
|
|
48
49
|
*/
|
|
49
50
|
injector?: Injector;
|
|
50
51
|
}
|
|
@@ -60,10 +61,11 @@ export declare interface ToObservableOptions {
|
|
|
60
61
|
* Before the `Observable` emits its first value, the `Signal` will return `undefined`. To avoid
|
|
61
62
|
* this, either an `initialValue` can be passed or the `requireSync` option enabled.
|
|
62
63
|
*
|
|
63
|
-
* By default, the subscription will be automatically cleaned up when the current injection
|
|
64
|
-
* is destroyed. For example, when `toObservable` is
|
|
65
|
-
* the subscription will be cleaned up when the
|
|
66
|
-
* not available, an explicit `Injector` can be
|
|
64
|
+
* By default, the subscription will be automatically cleaned up when the current [injection
|
|
65
|
+
* context](guide/dependency-injection-context) is destroyed. For example, when `toObservable` is
|
|
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 available, an explicit `Injector` can be
|
|
68
|
+
* passed instead.
|
|
67
69
|
*
|
|
68
70
|
* If the subscription should persist until the `Observable` itself completes, the `manualCleanup`
|
|
69
71
|
* option can be specified instead, which disables the automatic subscription teardown. No injection
|
|
@@ -110,10 +112,11 @@ export declare function toSignal<T>(source: Observable<T> | Subscribable<T>, opt
|
|
|
110
112
|
* `initialValue`. If the `Observable` is guaranteed to emit synchronously, then the `requireSync`
|
|
111
113
|
* option can be passed instead.
|
|
112
114
|
*
|
|
113
|
-
* By default, the subscription will be automatically cleaned up when the current injection
|
|
114
|
-
* is destroyed. For example, when `toObservable` is
|
|
115
|
-
* the subscription will be cleaned up when the
|
|
116
|
-
* not available, an explicit `Injector` can be
|
|
115
|
+
* By default, the subscription will be automatically cleaned up when the current [injection
|
|
116
|
+
* context](guide/dependency-injection-context) is destroyed. For example, when `toObservable` is
|
|
117
|
+
* 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 available, an explicit `Injector` can be
|
|
119
|
+
* passed instead.
|
|
117
120
|
*
|
|
118
121
|
* If the subscription should persist until the `Observable` itself completes, the `manualCleanup`
|
|
119
122
|
* option can be specified instead, which disables the automatic subscription teardown. No injection
|