@angular/core 15.2.1 → 16.0.0-next.1

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.
Files changed (62) hide show
  1. package/esm2020/src/application_init.mjs +3 -2
  2. package/esm2020/src/application_module.mjs +3 -2
  3. package/esm2020/src/application_ref.mjs +5 -3
  4. package/esm2020/src/change_detection/change_detector_ref.mjs +3 -2
  5. package/esm2020/src/change_detection/differs/iterable_differs.mjs +3 -2
  6. package/esm2020/src/change_detection/differs/keyvalue_differs.mjs +3 -2
  7. package/esm2020/src/console.mjs +3 -2
  8. package/esm2020/src/core.mjs +2 -1
  9. package/esm2020/src/core_private_export.mjs +2 -1
  10. package/esm2020/src/core_reactivity_export.mjs +11 -0
  11. package/esm2020/src/core_reactivity_export_internal.mjs +9 -0
  12. package/esm2020/src/di/injector.mjs +3 -2
  13. package/esm2020/src/di/r3_injector.mjs +5 -1
  14. package/esm2020/src/di/reflective_injector.mjs +3 -2
  15. package/esm2020/src/linker/compiler.mjs +3 -2
  16. package/esm2020/src/linker/component_factory_resolver.mjs +3 -2
  17. package/esm2020/src/linker/destroy_ref.mjs +41 -0
  18. package/esm2020/src/linker/element_ref.mjs +3 -2
  19. package/esm2020/src/linker/template_ref.mjs +3 -2
  20. package/esm2020/src/linker/view_container_ref.mjs +3 -2
  21. package/esm2020/src/linker.mjs +2 -1
  22. package/esm2020/src/render/api.mjs +3 -2
  23. package/esm2020/src/render/api_flags.mjs +1 -1
  24. package/esm2020/src/render3/features/standalone_feature.mjs +1 -1
  25. package/esm2020/src/render3/fields.mjs +10 -1
  26. package/esm2020/src/render3/hooks.mjs +3 -2
  27. package/esm2020/src/render3/instructions/shared.mjs +14 -14
  28. package/esm2020/src/render3/interfaces/definition.mjs +1 -1
  29. package/esm2020/src/render3/interfaces/view.mjs +3 -2
  30. package/esm2020/src/render3/node_manipulation.mjs +14 -14
  31. package/esm2020/src/render3/util/view_utils.mjs +11 -2
  32. package/esm2020/src/render3/view_ref.mjs +4 -3
  33. package/esm2020/src/sanitization/sanitizer.mjs +3 -2
  34. package/esm2020/src/signals/index.mjs +15 -0
  35. package/esm2020/src/signals/src/api.mjs +46 -0
  36. package/esm2020/src/signals/src/computed.mjs +142 -0
  37. package/esm2020/src/signals/src/effect.mjs +69 -0
  38. package/esm2020/src/signals/src/graph.mjs +114 -0
  39. package/esm2020/src/signals/src/signal.mjs +78 -0
  40. package/esm2020/src/signals/src/untracked.mjs +26 -0
  41. package/esm2020/src/signals/src/watch.mjs +54 -0
  42. package/esm2020/src/signals/src/weak_ref.mjs +11 -0
  43. package/esm2020/src/testability/testability.mjs +5 -3
  44. package/esm2020/src/transfer_state.mjs +148 -0
  45. package/esm2020/src/version.mjs +1 -1
  46. package/esm2020/testing/src/logger.mjs +6 -5
  47. package/esm2020/testing/src/ng_zone_mock.mjs +6 -5
  48. package/esm2020/testing/src/test_bed.mjs +3 -2
  49. package/fesm2015/core.mjs +699 -31
  50. package/fesm2015/core.mjs.map +1 -1
  51. package/fesm2015/testing.mjs +53 -30
  52. package/fesm2015/testing.mjs.map +1 -1
  53. package/fesm2020/core.mjs +695 -31
  54. package/fesm2020/core.mjs.map +1 -1
  55. package/fesm2020/testing.mjs +53 -30
  56. package/fesm2020/testing.mjs.map +1 -1
  57. package/index.d.ts +398 -2
  58. package/package.json +2 -2
  59. package/schematics/migrations/router-link-with-href/bundle.js.map +2 -2
  60. package/schematics/ng-generate/standalone-migration/bundle.js +777 -1053
  61. package/schematics/ng-generate/standalone-migration/bundle.js.map +4 -4
  62. package/testing/index.d.ts +1 -1
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v15.2.1
2
+ * @license Angular v16.0.0-next.1
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -1417,6 +1417,13 @@ declare type ComponentTemplate<T> = {
1417
1417
  <U extends T>(rf: ɵRenderFlags, ctx: T | U): void;
1418
1418
  };
1419
1419
 
1420
+ /**
1421
+ * Create a computed `Signal` which derives a reactive value from an expression.
1422
+ *
1423
+ * @developerPreview
1424
+ */
1425
+ export declare function computed<T>(computation: () => T, equal?: ValueEqualityFn<T>): Signal<T>;
1426
+
1420
1427
  /**
1421
1428
  * Configures the `Injector` to return an instance of a token.
1422
1429
  *
@@ -1465,6 +1472,78 @@ export declare interface ConstructorSansProvider {
1465
1472
  deps?: any[];
1466
1473
  }
1467
1474
 
1475
+ /**
1476
+ * Represents a reader that can depend on reactive values (`Producer`s) and receive
1477
+ * notifications when those values change.
1478
+ *
1479
+ * `Consumer`s do not wrap the reads they consume themselves, but rather can be set
1480
+ * as the active reader via `setActiveConsumer`.
1481
+ *
1482
+ * The set of dependencies of a `Consumer` is dynamic. Implementers expose a
1483
+ * monotonically increasing `trackingVersion` counter, which increments whenever
1484
+ * the `Consumer` is about to re-run any reactive reads it needs and establish a
1485
+ * new set of dependencies as a result.
1486
+ *
1487
+ * `Producer`s store the last `trackingVersion` they've seen from `Consumer`s which
1488
+ * have read them. This allows a `Producer` to identify whether its record of the
1489
+ * dependency is current or stale, by comparing the `Consumer`'s `trackingVersion`
1490
+ * to the version at which the dependency was established.
1491
+ */
1492
+ declare interface Consumer {
1493
+ /**
1494
+ * Numeric identifier of this `Producer`.
1495
+ *
1496
+ * May also be used to satisfy the interface for `Producer`.
1497
+ */
1498
+ readonly id: ConsumerId;
1499
+ /**
1500
+ * A `WeakRef` to this `Consumer` instance.
1501
+ *
1502
+ * An implementer provides this as a cached value to avoid the need to instantiate
1503
+ * multiple `WeakRef` instances for the same `Consumer`.
1504
+ *
1505
+ * May also be used to satisfy the interface for `Producer`.
1506
+ */
1507
+ readonly ref: WeakRef<Consumer>;
1508
+ /**
1509
+ * A map of `Edge`s to `Producer` dependencies, keyed by the `ProducerId`.
1510
+ *
1511
+ * Used to poll `Producer`s to determine if the `Consumer` has really updated
1512
+ * or not.
1513
+ */
1514
+ readonly producers: Map<ProducerId, Edge>;
1515
+ /**
1516
+ * Monotonically increasing counter representing a version of this `Consumer`'s
1517
+ * dependencies.
1518
+ */
1519
+ readonly trackingVersion: number;
1520
+ /**
1521
+ * Called when a `Producer` dependency of this `Consumer` indicates it may
1522
+ * have a new value.
1523
+ *
1524
+ * Notification alone does not mean the `Producer` has definitely produced a
1525
+ * semantically different value, only that it _may_ have changed. Before a
1526
+ * `Consumer` re-runs any computations or side effects, it should use the
1527
+ * `consumerPollValueStatus` method to poll the `Producer`s on which it depends
1528
+ * and determine if any of them have actually updated.
1529
+ */
1530
+ notify(): void;
1531
+ }
1532
+
1533
+ /**
1534
+ * Identifier for a `Consumer`, which is a branded `number`.
1535
+ *
1536
+ * Note that `ProducerId` and `ConsumerId` are assigned from the same sequence, so the same `number`
1537
+ * will never be used for both.
1538
+ *
1539
+ * Branding provides additional type safety by ensuring that `ProducerId` and `ConsumerId` are
1540
+ * mutually unassignable without a cast. Since several `Map`s are keyed by these IDs, this prevents
1541
+ * `ConsumerId`s from being inadvertently used to look up `Producer`s or vice versa.
1542
+ */
1543
+ declare type ConsumerId = number & {
1544
+ __consumer: true;
1545
+ };
1546
+
1468
1547
  /**
1469
1548
  * Type of the ContentChild metadata.
1470
1549
  *
@@ -2125,6 +2204,20 @@ declare type DestroyHookData = (HookEntry | HookData)[];
2125
2204
  */
2126
2205
  export declare function destroyPlatform(): void;
2127
2206
 
2207
+
2208
+ /**
2209
+ * `DestroyRef` lets you set callbacks to run for any cleanup or destruction behavior.
2210
+ * The scope of this destruction depends on where `DestroyRef` is injected. If `DestroyRef`
2211
+ * is injected in a component or directive, the callbacks run when that component or
2212
+ * directive is destroyed. Otherwise the callbacks run when a corresponding injector is destroyed.
2213
+ */
2214
+ export declare abstract class DestroyRef {
2215
+ /**
2216
+ * Registers a destroy callback in a given lifecycle scope.
2217
+ */
2218
+ abstract onDestroy(callback: () => void): void;
2219
+ }
2220
+
2128
2221
  /**
2129
2222
  * Directive decorator and metadata.
2130
2223
  *
@@ -2543,6 +2636,61 @@ export declare interface DoCheck {
2543
2636
  ngDoCheck(): void;
2544
2637
  }
2545
2638
 
2639
+ /**
2640
+ * A bidirectional edge in the producer-consumer dependency graph.
2641
+ */
2642
+ declare interface Edge {
2643
+ /**
2644
+ * Weakly held reference to the `Consumer` side of this edge.
2645
+ */
2646
+ readonly consumerRef: WeakRef<Consumer>;
2647
+ /**
2648
+ * Weakly held reference to the `Producer` side of this edge.
2649
+ */
2650
+ readonly producerRef: WeakRef<Producer>;
2651
+ /**
2652
+ * `trackingVersion` of the `Consumer` at which this dependency edge was last observed.
2653
+ *
2654
+ * If this doesn't match the `Consumer`'s current `trackingVersion`, then this dependency record
2655
+ * is stale, and needs to be cleaned up.
2656
+ */
2657
+ atTrackingVersion: number;
2658
+ /**
2659
+ * `valueVersion` of the `Producer` at the time this dependency was last accessed.
2660
+ *
2661
+ * This is used by `consumerPollValueStatus` to determine whether a `Consumer`'s dependencies have
2662
+ * semantically changed.
2663
+ */
2664
+ seenValueVersion: number;
2665
+ }
2666
+
2667
+ /**
2668
+ * A global reactive effect, which can be manually scheduled or destroyed.
2669
+ *
2670
+ * @developerPreview
2671
+ */
2672
+ export declare interface Effect {
2673
+ /**
2674
+ * Schedule the effect for manual execution, if it's not already.
2675
+ */
2676
+ schedule(): void;
2677
+ /**
2678
+ * Shut down the effect, removing it from any upcoming scheduled executions.
2679
+ */
2680
+ destroy(): void;
2681
+ /**
2682
+ * Direct access to the effect's `Consumer` for advanced use cases.
2683
+ */
2684
+ readonly consumer: Consumer;
2685
+ }
2686
+
2687
+ /**
2688
+ * Create a global `Effect` for the given reactive function.
2689
+ *
2690
+ * @developerPreview
2691
+ */
2692
+ export declare function effect(effectFn: () => void): Effect;
2693
+
2546
2694
  /**
2547
2695
  * Marks that the next string is an element name.
2548
2696
  *
@@ -4246,6 +4394,11 @@ declare interface InternalViewRef extends ViewRef {
4246
4394
  */
4247
4395
  export declare function isDevMode(): boolean;
4248
4396
 
4397
+ /**
4398
+ * Checks if the given `value` function is a reactive `Signal`.
4399
+ */
4400
+ export declare function isSignal(value: Function): value is Signal<unknown>;
4401
+
4249
4402
  /**
4250
4403
  * Checks whether a given Component, Directive or Pipe is marked as standalone.
4251
4404
  * This will return false if passed anything other than a Component, Directive, or Pipe class
@@ -4939,6 +5092,12 @@ declare interface LView<T = unknown> extends Array<any> {
4939
5092
  * precedence over the element and module injectors.
4940
5093
  */
4941
5094
  readonly [EMBEDDED_VIEW_INJECTOR]: Injector | null;
5095
+ /**
5096
+ * A collection of callbacks functions that are executed when a given LView is destroyed. Those
5097
+ * are user defined, LView-specific destroy callbacks that don't have any corresponding TView
5098
+ * entries.
5099
+ */
5100
+ [ON_DESTROY_HOOKS]: Array<() => void> | null;
4942
5101
  }
4943
5102
 
4944
5103
  /** Flags associated with an LView (saved in LView[FLAGS]) */
@@ -5504,6 +5663,8 @@ export declare class NgZone {
5504
5663
  */
5505
5664
  export declare const NO_ERRORS_SCHEMA: SchemaMetadata;
5506
5665
 
5666
+ declare const ON_DESTROY_HOOKS = 22;
5667
+
5507
5668
  /**
5508
5669
  * @description
5509
5670
  * A lifecycle hook that is called when any data-bound property of a directive changes.
@@ -5934,6 +6095,74 @@ declare const enum PreOrderHookFlags {
5934
6095
  */
5935
6096
  declare type ProcessProvidersFunction = (providers: Provider[]) => Provider[];
5936
6097
 
6098
+ /**
6099
+ * Represents a value that can be read reactively, and can notify readers (`Consumer`s)
6100
+ * when it changes.
6101
+ *
6102
+ * Producers maintain a weak reference to any `Consumer`s which may depend on the
6103
+ * producer's value.
6104
+ *
6105
+ * Implementers of `Producer` expose a monotonic `valueVersion` counter, and are responsible
6106
+ * for incrementing this version when their value semantically changes. Some Producers may
6107
+ * produce this value lazily and thus at times need to be polled for potential updates to
6108
+ * their value (and by extension their `valueVersion`). This is accomplished via the
6109
+ * `checkForChangedValue` method for Producers, which should perform whatever calculations
6110
+ * are necessary to ensure `valueVersion` is up to date.
6111
+ *
6112
+ * `Producer`s support two operations:
6113
+ * * `producerNotifyConsumers`
6114
+ * * `producerAccessed`
6115
+ */
6116
+ declare interface Producer {
6117
+ /**
6118
+ * Numeric identifier of this `Producer`.
6119
+ *
6120
+ * May also be used to satisfy the interface for `Consumer`.
6121
+ */
6122
+ readonly id: ProducerId;
6123
+ /**
6124
+ * A `WeakRef` to this `Producer` instance.
6125
+ *
6126
+ * An implementer provides this as a cached value to avoid the need to instantiate
6127
+ * multiple `WeakRef` instances for the same `Producer`.
6128
+ *
6129
+ * May also be used to satisfy the interface for `Consumer`.
6130
+ */
6131
+ readonly ref: WeakRef<Producer>;
6132
+ /**
6133
+ * A map of dependency `Edge`s to `Consumer`s, keyed by the `ConsumerId`.
6134
+ *
6135
+ * Used when the produced value changes to notify interested `Consumer`s.
6136
+ */
6137
+ readonly consumers: Map<ConsumerId, Edge>;
6138
+ /**
6139
+ * Monotonically increasing counter which increases when the value of this `Producer`
6140
+ * semantically changes.
6141
+ */
6142
+ readonly valueVersion: number;
6143
+ /**
6144
+ * Ensure that `valueVersion` is up to date for the `Producer`'s value.
6145
+ *
6146
+ * Some `Producer`s may produce values lazily, and thus require polling before their
6147
+ * `valueVersion` can be compared with the version captured during a previous read.
6148
+ */
6149
+ checkForChangedValue(): void;
6150
+ }
6151
+
6152
+ /**
6153
+ * Identifier for a `Producer`, which is a branded `number`.
6154
+ *
6155
+ * Note that `ProducerId` and `ConsumerId` are assigned from the same sequence, so the same `number`
6156
+ * will never be used for both.
6157
+ *
6158
+ * Branding provides additional type safety by ensuring that `ProducerId` and `ConsumerId` are
6159
+ * mutually unassignable without a cast. Since several `Map`s are keyed by these IDs, this prevents
6160
+ * `ProducerId`s from being inadvertently used to look up `Consumer`s or vice versa.
6161
+ */
6162
+ declare type ProducerId = number & {
6163
+ __producer: true;
6164
+ };
6165
+
5937
6166
  /**
5938
6167
  * List of slots for a projection. A slot can be either based on a parsed CSS selector
5939
6168
  * which will be used to determine nodes which are projected into that slot.
@@ -6991,7 +7220,7 @@ export declare interface RendererType2 {
6991
7220
  /**
6992
7221
  * Defines CSS styles to be stored on a renderer instance.
6993
7222
  */
6994
- styles: (string | any[])[];
7223
+ styles: string[];
6995
7224
  /**
6996
7225
  * Defines arbitrary developer-defined data to be stored on a renderer instance.
6997
7226
  * This is useful for renderers that delegate to other renderers.
@@ -7288,12 +7517,62 @@ export declare interface SelfDecorator {
7288
7517
  new (): Self;
7289
7518
  }
7290
7519
 
7520
+ /**
7521
+ * A `Signal` with a value that can be mutated via a setter interface.
7522
+ *
7523
+ * @developerPreview
7524
+ */
7525
+ export declare interface SettableSignal<T> extends Signal<T> {
7526
+ /**
7527
+ * Directly set the signal to a new value, and notify any dependents.
7528
+ */
7529
+ set(value: T): void;
7530
+ /**
7531
+ * Update the value of the signal based on its current value, and
7532
+ * notify any dependents.
7533
+ */
7534
+ update(updateFn: (value: T) => T): void;
7535
+ /**
7536
+ * Update the current value by mutating it in-place, and
7537
+ * notify any dependents.
7538
+ */
7539
+ mutate(mutatorFn: (value: T) => void): void;
7540
+ }
7541
+
7291
7542
  /**
7292
7543
  * Set the {@link GetTestability} implementation used by the Angular testing framework.
7293
7544
  * @publicApi
7294
7545
  */
7295
7546
  export declare function setTestabilityGetter(getter: GetTestability): void;
7296
7547
 
7548
+ /**
7549
+ * Symbol used to tell `Signal`s apart from other functions.
7550
+ *
7551
+ * This can be used to auto-unwrap signals in various cases, or to auto-wrap non-signal values.
7552
+ */
7553
+ declare const SIGNAL: unique symbol;
7554
+
7555
+ /**
7556
+ * A reactive value which notifies consumers of any changes.
7557
+ *
7558
+ * Signals are functions which returns their current value. To access the current value of a signal,
7559
+ * call it.
7560
+ *
7561
+ * Ordinary values can be turned into `Signal`s with the `signal` function.
7562
+ *
7563
+ * @developerPreview
7564
+ */
7565
+ export declare type Signal<T> = (() => T) & {
7566
+ [SIGNAL]: true;
7567
+ };
7568
+
7569
+ /**
7570
+ * Create a `Signal` that can be set or updated directly.
7571
+ *
7572
+ * @developerPreview
7573
+ */
7574
+ export declare function signal<T>(initialValue: T, equal?: ValueEqualityFn<T>): SettableSignal<T>;
7575
+
7297
7576
 
7298
7577
  /**
7299
7578
  * Represents a basic change from a previous to a new value for a single
@@ -9009,6 +9288,22 @@ declare type TypeOrFactory<T> = T | (() => T);
9009
9288
  export declare interface TypeProvider extends Type<any> {
9010
9289
  }
9011
9290
 
9291
+
9292
+ /**
9293
+ * Execute an arbitrary function in a non-reactive (non-tracking) context. The executed function
9294
+ * can, optionally, return a value.
9295
+ *
9296
+ * @developerPreview
9297
+ */
9298
+ export declare function untracked<T>(nonReactiveReadsFn: () => T): T;
9299
+
9300
+ /**
9301
+ * A comparison function which can determine if two values are equal.
9302
+ *
9303
+ * @developerPreview
9304
+ */
9305
+ export declare type ValueEqualityFn<T> = (a: T, b: T) => boolean;
9306
+
9012
9307
  /**
9013
9308
  * Configures the `Injector` to return a value for a token.
9014
9309
  * @see ["Dependency Injection Guide"](guide/dependency-injection).
@@ -9483,6 +9778,17 @@ declare interface ViewRefTracker {
9483
9778
  detachView(viewRef: ViewRef): void;
9484
9779
  }
9485
9780
 
9781
+
9782
+ declare interface WeakRef<T extends object> {
9783
+ deref(): T | undefined;
9784
+ }
9785
+
9786
+ declare const WeakRef: WeakRefCtor;
9787
+
9788
+ declare interface WeakRefCtor {
9789
+ new <T extends object>(value: T): WeakRef<T>;
9790
+ }
9791
+
9486
9792
  /**
9487
9793
  * Sanitizes the given unsafe, untrusted HTML fragment, and returns HTML text that is safe to add to
9488
9794
  * the DOM in a browser environment.
@@ -10105,6 +10411,8 @@ export declare interface ɵDirectiveType<T> extends Type<T> {
10105
10411
  ɵfac: unknown;
10106
10412
  }
10107
10413
 
10414
+ export declare function ɵescapeTransferStateContent(text: string): string;
10415
+
10108
10416
  /**
10109
10417
  * Index of each type of locale data from the extra locale data array
10110
10418
  */
@@ -10432,6 +10740,22 @@ export declare function ɵmakeDecorator<T>(name: string, props?: (...args: any[]
10432
10740
  (...args: any[]): (cls: any) => any;
10433
10741
  };
10434
10742
 
10743
+ /**
10744
+ * Create a `StateKey<T>` that can be used to store value of type T with `TransferState`.
10745
+ *
10746
+ * Example:
10747
+ *
10748
+ * ```
10749
+ * const COUNTER_KEY = makeStateKey<number>('counter');
10750
+ * let value = 10;
10751
+ *
10752
+ * transferState.set(COUNTER_KEY, value);
10753
+ * ```
10754
+ *
10755
+ * @publicApi
10756
+ */
10757
+ export declare function ɵmakeStateKey<T = void>(key: string): ɵStateKey<T>;
10758
+
10435
10759
 
10436
10760
  export declare const ɵNG_COMP_DEF: string;
10437
10761
 
@@ -10943,6 +11267,25 @@ export declare function ɵsetUnknownElementStrictMode(shouldThrow: boolean): voi
10943
11267
  */
10944
11268
  export declare function ɵsetUnknownPropertyStrictMode(shouldThrow: boolean): void;
10945
11269
 
11270
+ /**
11271
+ * A type-safe key to use with `TransferState`.
11272
+ *
11273
+ * Example:
11274
+ *
11275
+ * ```
11276
+ * const COUNTER_KEY = makeStateKey<number>('counter');
11277
+ * let value = 10;
11278
+ *
11279
+ * transferState.set(COUNTER_KEY, value);
11280
+ * ```
11281
+ *
11282
+ * @publicApi
11283
+ */
11284
+ export declare type ɵStateKey<T> = string & {
11285
+ __not_a_string: never;
11286
+ __value_type?: T;
11287
+ };
11288
+
10946
11289
  /** Store a value in the `data` at a given `index`. */
10947
11290
  export declare function ɵstore<T>(tView: TView, lView: LView, index: number, value: T): void;
10948
11291
 
@@ -10965,12 +11308,65 @@ export declare const ɵTESTABILITY: InjectionToken<Testability>;
10965
11308
  */
10966
11309
  export declare const ɵTESTABILITY_GETTER: InjectionToken<GetTestability>;
10967
11310
 
11311
+ /**
11312
+ * A key value store that is transferred from the application on the server side to the application
11313
+ * on the client side.
11314
+ *
11315
+ * The `TransferState` is available as an injectable token.
11316
+ * On the client, just inject this token using DI and use it, it will be lazily initialized.
11317
+ * On the server it's already included if `renderApplication` function is used. Otherwise, import
11318
+ * the `ServerTransferStateModule` module to make the `TransferState` available.
11319
+ *
11320
+ * The values in the store are serialized/deserialized using JSON.stringify/JSON.parse. So only
11321
+ * boolean, number, string, null and non-class objects will be serialized and deserialized in a
11322
+ * non-lossy manner.
11323
+ *
11324
+ * @publicApi
11325
+ */
11326
+ export declare class ɵTransferState {
11327
+ private store;
11328
+ private onSerializeCallbacks;
11329
+ constructor();
11330
+ /**
11331
+ * Get the value corresponding to a key. Return `defaultValue` if key is not found.
11332
+ */
11333
+ get<T>(key: ɵStateKey<T>, defaultValue: T): T;
11334
+ /**
11335
+ * Set the value corresponding to a key.
11336
+ */
11337
+ set<T>(key: ɵStateKey<T>, value: T): void;
11338
+ /**
11339
+ * Remove a key from the store.
11340
+ */
11341
+ remove<T>(key: ɵStateKey<T>): void;
11342
+ /**
11343
+ * Test whether a key exists in the store.
11344
+ */
11345
+ hasKey<T>(key: ɵStateKey<T>): boolean;
11346
+ /**
11347
+ * Indicates whether the state is empty.
11348
+ */
11349
+ get isEmpty(): boolean;
11350
+ /**
11351
+ * Register a callback to provide the value for a key when `toJson` is called.
11352
+ */
11353
+ onSerialize<T>(key: ɵStateKey<T>, callback: () => T): void;
11354
+ /**
11355
+ * Serialize the current state of the store to JSON.
11356
+ */
11357
+ toJson(): string;
11358
+ static ɵfac: i0.ɵɵFactoryDeclaration<ɵTransferState, never>;
11359
+ static ɵprov: i0.ɵɵInjectableDeclaration<ɵTransferState>;
11360
+ }
11361
+
10968
11362
  /**
10969
11363
  * Compute the pair of transitive scopes (compilation scope and exported scope) for a given type
10970
11364
  * (either a NgModule or a standalone component / directive / pipe).
10971
11365
  */
10972
11366
  export declare function ɵtransitiveScopesFor<T>(type: Type<T>): ɵNgModuleTransitiveScopes;
10973
11367
 
11368
+ export declare function ɵunescapeTransferStateContent(text: string): string;
11369
+
10974
11370
  /**
10975
11371
  * Helper function to remove all the locale data from `LOCALE_DATA`.
10976
11372
  */
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@angular/core",
3
- "version": "15.2.1",
3
+ "version": "16.0.0-next.1",
4
4
  "description": "Angular - the core framework",
5
5
  "author": "angular",
6
6
  "license": "MIT",
7
7
  "engines": {
8
- "node": "^14.20.0 || ^16.13.0 || >=18.10.0"
8
+ "node": "^16.13.0 || >=18.10.0"
9
9
  },
10
10
  "exports": {
11
11
  "./schematics/*": {