@angular/core 18.0.0-next.1 → 18.0.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.
Files changed (78) hide show
  1. package/esm2022/rxjs-interop/src/to_signal.mjs +2 -2
  2. package/esm2022/src/application/application_init.mjs +2 -2
  3. package/esm2022/src/application/application_ref.mjs +10 -15
  4. package/esm2022/src/application/application_tokens.mjs +3 -3
  5. package/esm2022/src/authoring/input/input.mjs +37 -14
  6. package/esm2022/src/authoring/input/input_signal.mjs +1 -1
  7. package/esm2022/src/authoring/input/input_signal_node.mjs +1 -1
  8. package/esm2022/src/authoring/input/input_type_checking.mjs +1 -1
  9. package/esm2022/src/authoring/model/model.mjs +35 -15
  10. package/esm2022/src/authoring/output/output.mjs +32 -10
  11. package/esm2022/src/authoring/queries.mjs +11 -1
  12. package/esm2022/src/change_detection/scheduling/ng_zone_scheduling.mjs +38 -4
  13. package/esm2022/src/change_detection/scheduling/zoneless_scheduling.mjs +5 -1
  14. package/esm2022/src/change_detection/scheduling/zoneless_scheduling_impl.mjs +91 -22
  15. package/esm2022/src/compiler/compiler_facade_interface.mjs +1 -1
  16. package/esm2022/src/core_private_export.mjs +4 -4
  17. package/esm2022/src/core_render3_private_export.mjs +2 -2
  18. package/esm2022/src/defer/instructions.mjs +23 -9
  19. package/esm2022/src/di/interface/provider.mjs +1 -1
  20. package/esm2022/src/di/metadata.mjs +1 -1
  21. package/esm2022/src/hydration/annotate.mjs +35 -49
  22. package/esm2022/src/hydration/api.mjs +36 -13
  23. package/esm2022/src/hydration/cleanup.mjs +4 -18
  24. package/esm2022/src/hydration/i18n.mjs +378 -0
  25. package/esm2022/src/hydration/interfaces.mjs +2 -1
  26. package/esm2022/src/hydration/node_lookup_utils.mjs +24 -10
  27. package/esm2022/src/hydration/utils.mjs +61 -2
  28. package/esm2022/src/linker/component_factory.mjs +1 -1
  29. package/esm2022/src/linker/view_container_ref.mjs +2 -2
  30. package/esm2022/src/linker/view_ref.mjs +4 -4
  31. package/esm2022/src/metadata/directives.mjs +1 -1
  32. package/esm2022/src/metadata/ng_module.mjs +1 -1
  33. package/esm2022/src/platform/platform_ref.mjs +3 -2
  34. package/esm2022/src/render3/component_ref.mjs +1 -1
  35. package/esm2022/src/render3/debug/framework_injector_profiler.mjs +2 -2
  36. package/esm2022/src/render3/i18n/i18n_apply.mjs +28 -6
  37. package/esm2022/src/render3/i18n/i18n_parse.mjs +2 -5
  38. package/esm2022/src/render3/i18n/i18n_util.mjs +6 -1
  39. package/esm2022/src/render3/instructions/control_flow.mjs +24 -15
  40. package/esm2022/src/render3/instructions/i18n.mjs +3 -1
  41. package/esm2022/src/render3/instructions/projection.mjs +35 -9
  42. package/esm2022/src/render3/instructions/template.mjs +45 -24
  43. package/esm2022/src/render3/jit/partial.mjs +13 -2
  44. package/esm2022/src/render3/util/injector_discovery_utils.mjs +13 -9
  45. package/esm2022/src/render3/util/view_utils.mjs +4 -14
  46. package/esm2022/src/util/callback_scheduler.mjs +25 -30
  47. package/esm2022/src/version.mjs +1 -1
  48. package/esm2022/src/zone/ng_zone.mjs +3 -3
  49. package/esm2022/testing/src/component_fixture.mjs +24 -59
  50. package/esm2022/testing/src/fake_async.mjs +6 -1
  51. package/esm2022/testing/src/logger.mjs +3 -3
  52. package/esm2022/testing/src/private_export.mjs +9 -0
  53. package/esm2022/testing/src/test_bed.mjs +4 -4
  54. package/esm2022/testing/src/test_hooks.mjs +3 -3
  55. package/esm2022/testing/src/testing.mjs +3 -2
  56. package/fesm2022/core.mjs +1499 -823
  57. package/fesm2022/core.mjs.map +1 -1
  58. package/fesm2022/primitives/signals.mjs +1 -1
  59. package/fesm2022/rxjs-interop.mjs +2 -2
  60. package/fesm2022/rxjs-interop.mjs.map +1 -1
  61. package/fesm2022/testing.mjs +64 -94
  62. package/fesm2022/testing.mjs.map +1 -1
  63. package/index.d.ts +269 -149
  64. package/package.json +1 -1
  65. package/primitives/signals/index.d.ts +1 -1
  66. package/rxjs-interop/index.d.ts +2 -2
  67. package/schematics/migrations/block-template-entities/bundle.js +313 -255
  68. package/schematics/migrations/block-template-entities/bundle.js.map +3 -3
  69. package/schematics/migrations/compiler-options/bundle.js +13 -13
  70. package/schematics/migrations/invalid-two-way-bindings/bundle.js +316 -257
  71. package/schematics/migrations/invalid-two-way-bindings/bundle.js.map +3 -3
  72. package/schematics/migrations/transfer-state/bundle.js +13 -13
  73. package/schematics/ng-generate/control-flow-migration/bundle.js +349 -276
  74. package/schematics/ng-generate/control-flow-migration/bundle.js.map +3 -3
  75. package/schematics/ng-generate/standalone-migration/bundle.js +1811 -1330
  76. package/schematics/ng-generate/standalone-migration/bundle.js.map +4 -4
  77. package/testing/index.d.ts +10 -3
  78. package/esm2022/src/change_detection/flags.mjs +0 -17
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v18.0.0-next.1
2
+ * @license Angular v18.0.0-next.3
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -339,7 +339,7 @@ export declare interface AfterViewInit {
339
339
  export declare const ANIMATION_MODULE_TYPE: InjectionToken<"NoopAnimations" | "BrowserAnimations">;
340
340
 
341
341
  /**
342
- * A [DI token](guide/glossary#di-token "DI token definition") that provides a set of callbacks to
342
+ * A DI token that provides a set of callbacks to
343
343
  * be called for every component that is bootstrapped.
344
344
  *
345
345
  * Each callback must take a `ComponentRef` instance and return nothing.
@@ -351,7 +351,7 @@ export declare const ANIMATION_MODULE_TYPE: InjectionToken<"NoopAnimations" | "B
351
351
  export declare const APP_BOOTSTRAP_LISTENER: InjectionToken<readonly ((compRef: ComponentRef<any>) => void)[]>;
352
352
 
353
353
  /**
354
- * A [DI token](guide/glossary#di-token "DI token definition") representing a string ID, used
354
+ * A DI token representing a string ID, used
355
355
  * primarily for prefixing application attributes and CSS styles when
356
356
  * {@link ViewEncapsulation#Emulated} is being used.
357
357
  *
@@ -383,7 +383,7 @@ export declare const APP_BOOTSTRAP_LISTENER: InjectionToken<readonly ((compRef:
383
383
  export declare const APP_ID: InjectionToken<string>;
384
384
 
385
385
  /**
386
- * A [DI token](guide/glossary#di-token "DI token definition") that you can use to provide
386
+ * A DI token that you can use to provide
387
387
  * one or more initialization functions.
388
388
  *
389
389
  * The provided functions are injected at application startup and executed during
@@ -644,6 +644,7 @@ export declare class ApplicationRef {
644
644
  private _destroyListeners;
645
645
  private readonly internalErrorHandler;
646
646
  private readonly afterRenderEffectManager;
647
+ private readonly zonelessEnabled;
647
648
  private externalTestViews;
648
649
  private beforeRender;
649
650
  private afterTick;
@@ -1767,11 +1768,11 @@ export declare abstract class ComponentRef<C> {
1767
1768
  */
1768
1769
  abstract setInput(name: string, value: unknown): void;
1769
1770
  /**
1770
- * The host or anchor [element](guide/glossary#element) for this component instance.
1771
+ * The host or anchor element for this component instance.
1771
1772
  */
1772
1773
  abstract get location(): ElementRef;
1773
1774
  /**
1774
- * The [dependency injector](guide/glossary#injector) for this component instance.
1775
+ * The dependency injector for this component instance.
1775
1776
  */
1776
1777
  abstract get injector(): Injector;
1777
1778
  /**
@@ -1779,7 +1780,7 @@ export declare abstract class ComponentRef<C> {
1779
1780
  */
1780
1781
  abstract get instance(): C;
1781
1782
  /**
1782
- * The [host view](guide/glossary#view-hierarchy) defined by the template
1783
+ * The host view defined by the template
1783
1784
  * for this component instance.
1784
1785
  */
1785
1786
  abstract get hostView(): ViewRef;
@@ -1900,6 +1901,9 @@ export declare const ContentChild: ContentChildDecorator;
1900
1901
  * headerRequired = contentChild.required(MyHeader); // Signal<MyHeader>
1901
1902
  * }
1902
1903
  * ```
1904
+ *
1905
+ * @initializerApiFunction
1906
+ * @developerPreview
1903
1907
  */
1904
1908
  export declare const contentChild: ContentChildFunction;
1905
1909
 
@@ -1987,6 +1991,7 @@ export declare interface ContentChildDecorator {
1987
1991
  * provides access to required query results via the `.required` property.
1988
1992
  *
1989
1993
  * @developerPreview
1994
+ * @docsPrivate Ignored because `contentChild` is the canonical API entry.
1990
1995
  */
1991
1996
  export declare interface ContentChildFunction {
1992
1997
  /**
@@ -2005,8 +2010,6 @@ export declare interface ContentChildFunction {
2005
2010
  }): Signal<ReadT | undefined>;
2006
2011
  /**
2007
2012
  * Initializes a content child query that is always expected to match.
2008
- *
2009
- * @developerPreview
2010
2013
  */
2011
2014
  required: {
2012
2015
  <LocatorT>(locator: ProviderToken<LocatorT> | string, opts?: {
@@ -2668,6 +2671,23 @@ declare interface DehydratedContainerView extends DehydratedView {
2668
2671
  data: Readonly<SerializedContainerView>;
2669
2672
  }
2670
2673
 
2674
+ /**
2675
+ * An object that contains information about a dehydrated ICU case,
2676
+ * to facilitate cleaning up ICU cases that were active during
2677
+ * server-side rendering, but not during hydration.
2678
+ */
2679
+ declare interface DehydratedIcuData {
2680
+ /**
2681
+ * The case index that this data represents.
2682
+ */
2683
+ case: number;
2684
+ /**
2685
+ * A reference back to the AST for the ICU node. This allows the
2686
+ * AST to be used to clean up dehydrated nodes.
2687
+ */
2688
+ node: I18nICUNode;
2689
+ }
2690
+
2671
2691
  /**
2672
2692
  * An object that contains hydration-related information serialized
2673
2693
  * on the server, as well as the necessary references to segments of
@@ -2712,11 +2732,19 @@ declare interface DehydratedView {
2712
2732
  * A mapping from a view to the first child to begin claiming nodes.
2713
2733
  *
2714
2734
  * This mapping is generated by an i18n block, and is the source of
2715
- * truth for the nodes inside of it. Once a view has been hydrated,
2716
- * the node is removed from the map. The remaining entries indicate
2717
- * dehydrated nodes that need to be cleaned up.
2735
+ * truth for the nodes inside of it.
2736
+ */
2737
+ i18nNodes?: Map<number, RNode | null>;
2738
+ /**
2739
+ * A mapping from the index of an ICU node to dehydrated data for it.
2740
+ *
2741
+ * This information is used during the hydration process on the client.
2742
+ * ICU cases that were active during server-side rendering will be added
2743
+ * to the map. The hydration logic will "claim" matching cases, removing
2744
+ * them from the map. The remaining entries are "unclaimed", and will be
2745
+ * removed from the DOM during hydration cleanup.
2718
2746
  */
2719
- i18nNodes?: Map<number, RNode>;
2747
+ dehydratedIcuData?: Map<number, DehydratedIcuData>;
2720
2748
  }
2721
2749
 
2722
2750
  /**
@@ -3002,9 +3030,9 @@ export declare interface Directive {
3002
3030
  */
3003
3031
  outputs?: string[];
3004
3032
  /**
3005
- * Configures the [injector](guide/glossary#injector) of this
3006
- * directive or component with a [token](guide/glossary#di-token)
3007
- * that maps to a [provider](guide/glossary#provider) of a dependency.
3033
+ * Configures the injector of this
3034
+ * directive or component with a token
3035
+ * that maps to a provider of a dependency.
3008
3036
  */
3009
3037
  providers?: Provider[];
3010
3038
  /**
@@ -3572,8 +3600,8 @@ export declare class ElementRef<T = any> {
3572
3600
  declare const EMBEDDED_VIEW_INJECTOR = 20;
3573
3601
 
3574
3602
  /**
3575
- * Represents an Angular [view](guide/glossary#view) in a view container.
3576
- * An [embedded view](guide/glossary#view-hierarchy) can be referenced from a component
3603
+ * Represents an Angular view in a view container.
3604
+ * An embedded view can be referenced from a component
3577
3605
  * other than the hosting component whose template defines it, or it can be defined
3578
3606
  * independently by a `TemplateRef`.
3579
3607
  *
@@ -4684,6 +4712,8 @@ declare namespace i0 {
4684
4712
  }
4685
4713
  }
4686
4714
 
4715
+ declare const I18N_DATA = "l";
4716
+
4687
4717
  /**
4688
4718
  * Array storing OpCode for dynamically creating `i18n` translation DOM elements.
4689
4719
  *
@@ -5060,7 +5090,7 @@ declare type InitialInputs = (string | ɵɵInputFlags)[];
5060
5090
  */
5061
5091
  export declare interface Inject {
5062
5092
  /**
5063
- * A [DI token](guide/glossary#di-token) that maps to the dependency to be injected.
5093
+ * A DI token that maps to the dependency to be injected.
5064
5094
  */
5065
5095
  token: any;
5066
5096
  }
@@ -5575,29 +5605,52 @@ export declare interface Input {
5575
5605
  export declare const Input: InputDecorator;
5576
5606
 
5577
5607
  /**
5578
- * The `input` function allows declaration of inputs in directives and
5579
- * components.
5608
+ * The `input` function allows declaration of Angular inputs in directives
5609
+ * and components.
5610
+ *
5611
+ * There are two variants of inputs that can be declared:
5580
5612
  *
5581
- * Initializes an input with an initial value. If no explicit value
5582
- * is specified, Angular will use `undefined`.
5613
+ * 1. **Optional inputs** with an initial value.
5614
+ * 2. **Required inputs** that consumers need to set.
5583
5615
  *
5584
- * Consider using `input.required` for inputs that don't need an
5585
- * initial value.
5616
+ * By default, the `input` function will declare optional inputs that
5617
+ * always have an initial value. Required inputs can be declared
5618
+ * using the `input.required()` function.
5619
+ *
5620
+ * Inputs are signals. The values of an input are exposed as a `Signal`.
5621
+ * The signal always holds the latest value of the input that is bound
5622
+ * from the parent.
5586
5623
  *
5587
5624
  * @usageNotes
5588
- * Initialize an input in your directive or component by declaring a
5589
- * class field and initializing it with the `input()` function.
5625
+ * To use signal-based inputs, import `input` from `@angular/core`.
5626
+ *
5627
+ * ```
5628
+ * import {input} from '@angular/core`;
5629
+ * ```
5630
+ *
5631
+ * Inside your component, introduce a new class member and initialize
5632
+ * it with a call to `input` or `input.required`.
5590
5633
  *
5591
5634
  * ```ts
5592
- * @Directive({..})
5593
- * export class MyDir {
5594
- * firstName = input<string>(); // string|undefined
5595
- * lastName = input.required<string>(); // string
5596
- * age = input(0); // number
5635
+ * @Component({
5636
+ * ...
5637
+ * })
5638
+ * export class UserProfileComponent {
5639
+ * firstName = input<string>(); // Signal<string|undefined>
5640
+ * lastName = input.required<string>(); // Signal<string>
5641
+ * age = input(0) // Signal<number>
5597
5642
  * }
5598
5643
  * ```
5599
5644
  *
5645
+ * Inside your component template, you can display values of the inputs
5646
+ * by calling the signal.
5647
+ *
5648
+ * ```html
5649
+ * <span>{{firstName()}}</span>
5650
+ * ```
5651
+ *
5600
5652
  * @developerPreview
5653
+ * @initializerApiFunction
5601
5654
  */
5602
5655
  export declare const input: InputFunction;
5603
5656
 
@@ -5667,46 +5720,43 @@ export declare interface InputDecorator {
5667
5720
  * The function exposes an API for also declaring required inputs via the
5668
5721
  * `input.required` function.
5669
5722
  *
5670
- * @usageNotes
5671
- * Initialize an input in your directive or component by declaring a
5672
- * class field and initializing it with the `input()` or `input.required()`
5673
- * function.
5674
- *
5675
- * ```ts
5676
- * @Directive({..})
5677
- * export class MyDir {
5678
- * firstName = input<string>(); // string|undefined
5679
- * lastName = input.required<string>(); // string
5680
- * age = input(0); // number
5681
- * }
5682
- * ```
5683
- *
5684
5723
  * @developerPreview
5724
+ * @docsPrivate Ignored because `input` is the canonical API entry.
5685
5725
  */
5686
5726
  export declare interface InputFunction {
5687
5727
  /**
5688
- * Initializes an input with an initial value. If no explicit value
5689
- * is specified, Angular will use `undefined`.
5690
- *
5691
- * Consider using `input.required` for inputs that don't need an
5692
- * initial value.
5728
+ * Initializes an input of type `T` with an initial value of `undefined`.
5729
+ * Angular will implicitly use `undefined` as initial value.
5730
+ */
5731
+ <T>(): InputSignal<T | undefined>;
5732
+ /** Declares an input of type `T` with an explicit initial value. */
5733
+ <T>(initialValue: T, opts?: InputOptionsWithoutTransform<T>): InputSignal<T>;
5734
+ /**
5735
+ * Declares an input of type `T` with an initial value and a transform
5736
+ * function.
5693
5737
  *
5694
- * @developerPreview
5738
+ * The input accepts values of type `TransformT` and the given
5739
+ * transform function will transform the value to type `T`.
5695
5740
  */
5696
- <ReadT>(): InputSignal<ReadT | undefined>;
5697
- <ReadT>(initialValue: ReadT, opts?: InputOptionsWithoutTransform<ReadT>): InputSignal<ReadT>;
5698
- <ReadT, WriteT>(initialValue: ReadT, opts: InputOptionsWithTransform<ReadT, WriteT>): InputSignalWithTransform<ReadT, WriteT>;
5741
+ <T, TransformT>(initialValue: T, opts: InputOptionsWithTransform<T, TransformT>): InputSignalWithTransform<T, TransformT>;
5699
5742
  /**
5700
5743
  * Initializes a required input.
5701
5744
  *
5702
- * Users of your directive/component need to bind to this
5745
+ * Consumers of your directive/component need to bind to this
5703
5746
  * input. If unset, a compile time error will be reported.
5704
5747
  *
5705
5748
  * @developerPreview
5706
5749
  */
5707
5750
  required: {
5708
- <ReadT>(opts?: InputOptionsWithoutTransform<ReadT>): InputSignal<ReadT>;
5709
- <ReadT, WriteT>(opts: InputOptionsWithTransform<ReadT, WriteT>): InputSignalWithTransform<ReadT, WriteT>;
5751
+ /** Declares a required input of type `T`. */
5752
+ <T>(opts?: InputOptionsWithoutTransform<T>): InputSignal<T>;
5753
+ /**
5754
+ * Declares a required input of type `T` with a transform function.
5755
+ *
5756
+ * The input accepts values of type `TransformT` and the given
5757
+ * transform function will transform the value to type `T`.
5758
+ */
5759
+ <T, TransformT>(opts: InputOptionsWithTransform<T, TransformT>): InputSignalWithTransform<T, TransformT>;
5710
5760
  };
5711
5761
  }
5712
5762
 
@@ -5715,7 +5765,7 @@ export declare interface InputFunction {
5715
5765
  *
5716
5766
  * Options for signal inputs.
5717
5767
  */
5718
- export declare interface InputOptions<ReadT, WriteT> {
5768
+ export declare interface InputOptions<T, TransformT> {
5719
5769
  /** Optional public name for the input. By default, the class field name is used. */
5720
5770
  alias?: string;
5721
5771
  /**
@@ -5728,7 +5778,7 @@ export declare interface InputOptions<ReadT, WriteT> {
5728
5778
  * attribute form to bind to the input via `<my-dir input>`. A transform can then
5729
5779
  * handle such string values and convert them to `boolean`. See: {@link booleanAttribute}.
5730
5780
  */
5731
- transform?: (v: WriteT) => ReadT;
5781
+ transform?: (v: TransformT) => T;
5732
5782
  }
5733
5783
 
5734
5784
  /**
@@ -5736,7 +5786,7 @@ export declare interface InputOptions<ReadT, WriteT> {
5736
5786
  *
5737
5787
  * @developerPreview
5738
5788
  */
5739
- export declare type InputOptionsWithoutTransform<ReadT> = Omit<InputOptions<ReadT, ReadT>, 'transform'> & {
5789
+ export declare type InputOptionsWithoutTransform<T> = Omit<InputOptions<T, T>, 'transform'> & {
5740
5790
  transform?: undefined;
5741
5791
  };
5742
5792
 
@@ -5745,7 +5795,7 @@ export declare type InputOptionsWithoutTransform<ReadT> = Omit<InputOptions<Read
5745
5795
  *
5746
5796
  * @developerPreview
5747
5797
  */
5748
- export declare type InputOptionsWithTransform<ReadT, WriteT> = Required<Pick<InputOptions<ReadT, WriteT>, 'transform'>> & InputOptions<ReadT, WriteT>;
5798
+ export declare type InputOptionsWithTransform<T, TransformT> = Required<Pick<InputOptions<T, TransformT>, 'transform'>> & InputOptions<T, TransformT>;
5749
5799
 
5750
5800
  /**
5751
5801
  * `InputSignal` represents a special `Signal` for a directive/component input.
@@ -5758,28 +5808,28 @@ export declare type InputOptionsWithTransform<ReadT, WriteT> = Required<Pick<Inp
5758
5808
  *
5759
5809
  * @developerPreview
5760
5810
  */
5761
- export declare interface InputSignal<ReadT> extends InputSignalWithTransform<ReadT, ReadT> {
5811
+ export declare interface InputSignal<T> extends InputSignalWithTransform<T, T> {
5762
5812
  }
5763
5813
 
5764
5814
  /**
5765
5815
  * Reactive node type for an input signal. An input signal extends a signal.
5766
5816
  * There are special properties to enable transforms and required inputs.
5767
5817
  */
5768
- declare interface InputSignalNode<ReadT, WriteT> extends SignalNode<ReadT> {
5818
+ declare interface InputSignalNode<T, TransformT> extends SignalNode<T> {
5769
5819
  /**
5770
5820
  * User-configured transform that will run whenever a new value is applied
5771
5821
  * to the input signal node.
5772
5822
  */
5773
- transformFn: ((value: WriteT) => ReadT) | undefined;
5823
+ transformFn: ((value: TransformT) => T) | undefined;
5774
5824
  /**
5775
5825
  * Applies a new value to the input signal. Expects transforms to be run
5776
5826
  * manually before.
5777
5827
  *
5778
5828
  * This function is called by the framework runtime code whenever a binding
5779
5829
  * changes. The value can in practice be anything at runtime, but for typing
5780
- * purposes we assume it's a valid `ReadT` value. Type-checking will enforce that.
5830
+ * purposes we assume it's a valid `T` value. Type-checking will enforce that.
5781
5831
  */
5782
- applyValueToInputSignal<ReadT, WriteT>(node: InputSignalNode<ReadT, WriteT>, value: ReadT): void;
5832
+ applyValueToInputSignal<T, TransformT>(node: InputSignalNode<T, TransformT>, value: T): void;
5783
5833
  }
5784
5834
 
5785
5835
  /**
@@ -5806,10 +5856,10 @@ declare interface InputSignalNode<ReadT, WriteT> extends SignalNode<ReadT> {
5806
5856
  *
5807
5857
  * @developerPreview
5808
5858
  */
5809
- export declare interface InputSignalWithTransform<ReadT, WriteT> extends Signal<ReadT> {
5810
- [SIGNAL]: InputSignalNode<ReadT, WriteT>;
5811
- [ɵINPUT_SIGNAL_BRAND_READ_TYPE]: ReadT;
5812
- [ɵINPUT_SIGNAL_BRAND_WRITE_TYPE]: WriteT;
5859
+ export declare interface InputSignalWithTransform<T, TransformT> extends Signal<T> {
5860
+ [SIGNAL]: InputSignalNode<T, TransformT>;
5861
+ [ɵINPUT_SIGNAL_BRAND_READ_TYPE]: T;
5862
+ [ɵINPUT_SIGNAL_BRAND_WRITE_TYPE]: TransformT;
5813
5863
  }
5814
5864
 
5815
5865
  /** Function that can be used to transform incoming input values. */
@@ -6776,31 +6826,51 @@ export declare enum MissingTranslationStrategy {
6776
6826
  }
6777
6827
 
6778
6828
  /**
6779
- * `model` declares a writeable signal that is exposed as an input/output pair on the containing
6780
- * directive. The input name is taken either from the class member or from the `alias` option.
6829
+ * `model` declares a writeable signal that is exposed as an input/output
6830
+ * pair on the containing directive.
6831
+ *
6832
+ * The input name is taken either from the class member or from the `alias` option.
6781
6833
  * The output name is generated by taking the input name and appending `Change`.
6782
6834
  *
6783
- * Initializes a model with an initial value. If no explicit value
6784
- * is specified, Angular will use `undefined`.
6835
+ * @usageNotes
6785
6836
  *
6786
- * Consider using `model.required` for models that don't need an
6787
- * initial value.
6837
+ * To use `model()`, import the function from `@angular/core`.
6788
6838
  *
6789
- * @usageNotes
6790
- * Initialize a model in your directive or component by declaring a
6791
- * class field and initializing it with the `model()` or `model.required()`
6792
- * function.
6839
+ * ```
6840
+ * import {model} from '@angular/core`;
6841
+ * ```
6842
+ *
6843
+ * Inside your component, introduce a new class member and initialize
6844
+ * it with a call to `model` or `model.required`.
6793
6845
  *
6794
6846
  * ```ts
6795
- * @Directive({..})
6847
+ * @Directive({
6848
+ * ...
6849
+ * })
6796
6850
  * export class MyDir {
6797
- * firstName = model<string>(); // string|undefined
6798
- * lastName = model.required<string>(); // string
6799
- * age = model(0); // number
6851
+ * firstName = model<string>(); // ModelSignal<string|undefined>
6852
+ * lastName = model.required<string>(); // ModelSignal<string>
6853
+ * age = model(0); // ModelSignal<number>
6854
+ * }
6855
+ * ```
6856
+ *
6857
+ * Inside your component template, you can display the value of a `model`
6858
+ * by calling the signal.
6859
+ *
6860
+ * ```html
6861
+ * <span>{{firstName()}}</span>
6862
+ * ```
6863
+ *
6864
+ * Updating the `model` is equivalent to updating a writable signal.
6865
+ *
6866
+ * ```ts
6867
+ * updateName(newFirstName: string): void {
6868
+ * this.firstName.set(newFirstName);
6800
6869
  * }
6801
6870
  * ```
6802
6871
  *
6803
6872
  * @developerPreview
6873
+ * @initializerApiFunction
6804
6874
  */
6805
6875
  export declare const model: ModelFunction;
6806
6876
 
@@ -6812,43 +6882,26 @@ export declare const model: ModelFunction;
6812
6882
  * The function exposes an API for also declaring required models via the
6813
6883
  * `model.required` function.
6814
6884
  *
6815
- * @usageNotes
6816
- * Initialize a model in your directive or component by declaring a
6817
- * class field and initializing it with the `model()` or `model.required()`
6818
- * function.
6819
- *
6820
- * ```ts
6821
- * @Directive({..})
6822
- * export class MyDir {
6823
- * firstName = model<string>(); // string|undefined
6824
- * lastName = model.required<string>(); // string
6825
- * age = model(0); // number
6826
- * }
6827
- * ```
6828
- *
6829
6885
  * @developerPreview
6886
+ * @docsPrivate Ignored because `model` is the canonical API entry.
6830
6887
  */
6831
6888
  export declare interface ModelFunction {
6832
6889
  /**
6833
- * Initializes a model with an initial value. If no explicit value
6834
- * is specified, Angular will use `undefined`.
6835
- *
6836
- * Consider using `model.required` for models that don't need an
6837
- * initial value.
6838
- *
6839
- * @developerPreview
6890
+ * Initializes a model of type `T` with an initial value of `undefined`.
6891
+ * Angular will implicitly use `undefined` as initial value.
6840
6892
  */
6841
6893
  <T>(): ModelSignal<T | undefined>;
6894
+ /** Initializes a model of type `T` with the given initial value. */
6842
6895
  <T>(initialValue: T, opts?: ModelOptions): ModelSignal<T>;
6843
- /**
6844
- * Initializes a required model.
6845
- *
6846
- * Users of your directive/component need to bind to the input side of the model.
6847
- * If unset, a compile time error will be reported.
6848
- *
6849
- * @developerPreview
6850
- */
6851
- required<T>(opts?: ModelOptions): ModelSignal<T>;
6896
+ required: {
6897
+ /**
6898
+ * Initializes a required model.
6899
+ *
6900
+ * Users of your directive/component need to bind to the input side of the model.
6901
+ * If unset, a compile time error will be reported.
6902
+ */
6903
+ <T>(opts?: ModelOptions): ModelSignal<T>;
6904
+ };
6852
6905
  }
6853
6906
 
6854
6907
  /**
@@ -6895,8 +6948,8 @@ export declare class ModuleWithComponentFactories<T> {
6895
6948
  }
6896
6949
 
6897
6950
  /**
6898
- * A wrapper around an NgModule that associates it with [providers](guide/glossary#provider
6899
- * "Definition"). Usage without a generic type is deprecated.
6951
+ * A wrapper around an NgModule that associates it with providers
6952
+ * Usage without a generic type is deprecated.
6900
6953
  *
6901
6954
  * @see [Deprecations](guide/deprecations#modulewithproviders-type-without-a-generic)
6902
6955
  *
@@ -6983,7 +7036,7 @@ export declare interface NgModule {
6983
7036
  */
6984
7037
  providers?: Array<Provider | EnvironmentProviders>;
6985
7038
  /**
6986
- * The set of components, directives, and pipes ([declarables](guide/glossary#declarable))
7039
+ * The set of components, directives, and pipes (declarables
6987
7040
  * that belong to this module.
6988
7041
  *
6989
7042
  * @usageNotes
@@ -7010,7 +7063,7 @@ export declare interface NgModule {
7010
7063
  */
7011
7064
  declarations?: Array<Type<any> | any[]>;
7012
7065
  /**
7013
- * The set of NgModules whose exported [declarables](guide/glossary#declarable)
7066
+ * The set of NgModules whose exported declarables
7014
7067
  * are available to templates in this module.
7015
7068
  *
7016
7069
  * @usageNotes
@@ -7476,7 +7529,6 @@ declare type NodeOutputBindings = Record<string, (number | string)[]>;
7476
7529
 
7477
7530
  declare const NODES = "n";
7478
7531
 
7479
-
7480
7532
  declare const enum NotificationType {
7481
7533
  RefreshViews = 0,
7482
7534
  AfterRenderHooks = 1
@@ -7647,25 +7699,47 @@ export declare interface Output {
7647
7699
  export declare const Output: OutputDecorator;
7648
7700
 
7649
7701
  /**
7650
- * The `output` function allows declaration of outputs in directives and
7651
- * components.
7702
+ * The `output` function allows declaration of Angular outputs in
7703
+ * directives and components.
7652
7704
  *
7653
- * Initializes an output that can emit values to consumers of your
7654
- * directive/component.
7705
+ * You can use outputs to emit values to parent directives and component.
7706
+ * Parents can subscribe to changes via:
7707
+ *
7708
+ * - template event bindings. For example, `(myOutput)="doSomething($event)"`
7709
+ * - programmatic subscription by using `OutputRef#subscribe`.
7655
7710
  *
7656
7711
  * @usageNotes
7657
- * Initialize an output in your directive by declaring a
7658
- * class field and initializing it with the `output()` function.
7712
+ *
7713
+ * To use `output()`, import the function from `@angular/core`.
7714
+ *
7715
+ * ```
7716
+ * import {output} from '@angular/core`;
7717
+ * ```
7718
+ *
7719
+ * Inside your component, introduce a new class member and initialize
7720
+ * it with a call to `output`.
7659
7721
  *
7660
7722
  * ```ts
7661
- * @Directive({..})
7723
+ * @Directive({
7724
+ * ...
7725
+ * })
7662
7726
  * export class MyDir {
7663
- * nameChange = output<string>(); // OutputEmitterRef<string>
7664
- * onClick = output(); // OutputEmitterRef<void>
7727
+ * nameChange = output<string>(); // OutputEmitterRef<string>
7728
+ * onClick = output(); // OutputEmitterRef<void>
7729
+ * }
7730
+ * ```
7731
+ *
7732
+ * You can emit values to consumers of your directive, by using
7733
+ * the `emit` method from `OutputEmitterRef`.
7734
+ *
7735
+ * ```ts
7736
+ * updateName(newName: string): void {
7737
+ * this.nameChange.emit(newName);
7665
7738
  * }
7666
7739
  * ```
7667
7740
  *
7668
7741
  * @developerPreview
7742
+ * @initializerApiFunction {"showTypesInSignaturePreview": true}
7669
7743
  */
7670
7744
  export declare function output<T = void>(opts?: OutputOptions): OutputEmitterRef<T>;
7671
7745
 
@@ -7758,7 +7832,7 @@ export declare interface OutputRefSubscription {
7758
7832
  }
7759
7833
 
7760
7834
  /**
7761
- * A [DI token](guide/glossary#di-token "DI token definition") that indicates the root directory of
7835
+ * A DI token that indicates the root directory of
7762
7836
  * the application
7763
7837
  * @publicApi
7764
7838
  * @deprecated
@@ -7775,7 +7849,7 @@ declare const PARENT = 3;
7775
7849
  export declare interface Pipe {
7776
7850
  /**
7777
7851
  * The pipe name to use in template bindings.
7778
- * Typically uses [lowerCamelCase](guide/glossary#case-types)
7852
+ * Typically uses lowerCamelCase
7779
7853
  * because the name cannot contain hyphens.
7780
7854
  */
7781
7855
  name: string;
@@ -8258,6 +8332,7 @@ declare interface R3DeclareComponentFacade extends R3DeclareDirectiveFacade {
8258
8332
  pipes?: {
8259
8333
  [pipeName: string]: OpaqueValue | (() => OpaqueValue);
8260
8334
  };
8335
+ deferBlockDependencies?: (() => Promise<Type_2> | null)[];
8261
8336
  viewProviders?: OpaqueValue;
8262
8337
  animations?: OpaqueValue;
8263
8338
  changeDetection?: ChangeDetectionStrategy_2;
@@ -9108,6 +9183,13 @@ declare interface SerializedView {
9108
9183
  * logic for such nodes and instead use a regular "creation mode".
9109
9184
  */
9110
9185
  [DISCONNECTED_NODES]?: number[];
9186
+ /**
9187
+ * Serialized information about i18n blocks in a template.
9188
+ * Key-value pairs where a key is an index of the corresponding
9189
+ * i18n entry within an LView, and the value is a list of
9190
+ * active ICU cases.
9191
+ */
9192
+ [I18N_DATA]?: Record<number, number[]>;
9111
9193
  }
9112
9194
 
9113
9195
  /**
@@ -11103,6 +11185,7 @@ export declare const ViewChild: ViewChildDecorator;
11103
11185
  * ```
11104
11186
  *
11105
11187
  * @developerPreview
11188
+ * @initializerApiFunction
11106
11189
  */
11107
11190
  export declare const viewChild: ViewChildFunction;
11108
11191
 
@@ -11184,6 +11267,7 @@ export declare interface ViewChildDecorator {
11184
11267
  * property.
11185
11268
  *
11186
11269
  * @developerPreview
11270
+ * @docsPrivate Ignored because `viewChild` is the canonical API entry.
11187
11271
  */
11188
11272
  export declare interface ViewChildFunction {
11189
11273
  /**
@@ -11307,7 +11391,7 @@ export declare interface ViewChildrenDecorator {
11307
11391
  * (created by instantiating a `TemplateRef` with the `createEmbeddedView()` method).
11308
11392
  *
11309
11393
  * A view container instance can contain other view containers,
11310
- * creating a [view hierarchy](guide/glossary#view-hierarchy).
11394
+ * creating a view hierarchy.
11311
11395
  *
11312
11396
  * @usageNotes
11313
11397
  *
@@ -11364,7 +11448,7 @@ export declare abstract class ViewContainerRef {
11364
11448
  */
11365
11449
  abstract get element(): ElementRef;
11366
11450
  /**
11367
- * The [dependency injector](guide/glossary#injector) for this view container.
11451
+ * The dependency injector for this view container.
11368
11452
  */
11369
11453
  abstract get injector(): Injector;
11370
11454
  /** @deprecated No replacement */
@@ -11546,7 +11630,7 @@ declare enum ViewEncapsulation_2 {
11546
11630
  declare type ViewQueriesFunction<T> = <U extends T>(rf: ɵRenderFlags, ctx: U) => void;
11547
11631
 
11548
11632
  /**
11549
- * Represents an Angular [view](guide/glossary#view "Definition").
11633
+ * Represents an Angular view.
11550
11634
  *
11551
11635
  * @see {@link ChangeDetectorRef#usage-notes Change detection usage}
11552
11636
  *
@@ -11863,6 +11947,7 @@ export declare const enum ɵBypassType {
11863
11947
  */
11864
11948
  export declare abstract class ɵChangeDetectionScheduler {
11865
11949
  abstract notify(source?: NotificationType): void;
11950
+ abstract tick(shouldRefreshViews: boolean): void;
11866
11951
  }
11867
11952
 
11868
11953
  export declare function ɵclearResolutionOfComponentResourcesQueue(): Map<Type<any>, Component>;
@@ -12181,7 +12266,7 @@ export declare enum ɵDeferBlockState {
12181
12266
  /** The deps tracker to be used in the current Angular app in dev mode. */
12182
12267
  export declare const ɵdepsTracker: DepsTracker;
12183
12268
 
12184
- export declare function ɵdetectChangesInViewIfRequired(lView: LView, isFirstPass: boolean, notifyErrorHandler: boolean): void;
12269
+ export declare function ɵdetectChangesInViewIfRequired(lView: LView, notifyErrorHandler: boolean, isFirstPass: boolean, zonelessEnabled: boolean): void;
12185
12270
 
12186
12271
 
12187
12272
  export declare function ɵdevModeEqual(a: any, b: any): boolean;
@@ -12440,9 +12525,6 @@ export declare function ɵgetDeferBlocks(lView: LView, deferBlocks: ɵDeferBlock
12440
12525
  */
12441
12526
  export declare function ɵgetDirectives(node: Node): {}[];
12442
12527
 
12443
-
12444
- export declare function ɵgetEnsureDirtyViewsAreAlwaysReachable(): boolean;
12445
-
12446
12528
  /**
12447
12529
  * Retrieves the host element of a component or directive instance.
12448
12530
  * The host element is the DOM element that matched the selector of the directive.
@@ -13410,6 +13492,23 @@ export declare interface ɵSafeUrl extends ɵSafeValue {
13410
13492
  export declare interface ɵSafeValue {
13411
13493
  }
13412
13494
 
13495
+ /**
13496
+ * Configures change detection scheduling when using ZoneJS.
13497
+ */
13498
+ export declare enum ɵSchedulingMode {
13499
+ /**
13500
+ * Change detection will run when the `NgZone.onMicrotaskEmpty` observable emits.
13501
+ * Change detection will also be scheduled to run whenever Angular is notified
13502
+ * of a change. This includes calling `ChangeDetectorRef.markForCheck`,
13503
+ * setting a `signal` value, and attaching a view.
13504
+ */
13505
+ Hybrid = 0,
13506
+ /**
13507
+ * Change detection will only run when the `NgZone.onMicrotaskEmpty` observable emits.
13508
+ */
13509
+ NgZoneOnly = 1
13510
+ }
13511
+
13413
13512
  /**
13414
13513
  * Control whether the NgModule registration system enforces that each NgModule type registered has
13415
13514
  * a unique id.
@@ -13464,8 +13563,6 @@ export declare function ɵsetCurrentInjector(injector: Injector | null | undefin
13464
13563
  */
13465
13564
  export declare function ɵsetDocument(document: Document | undefined): void;
13466
13565
 
13467
- export declare function ɵsetEnsureDirtyViewsAreAlwaysReachable(v: boolean): void;
13468
-
13469
13566
  export declare function ɵsetInjectorProfilerContext(context: ɵInjectorProfilerContext): ɵInjectorProfilerContext;
13470
13567
 
13471
13568
 
@@ -13555,7 +13652,7 @@ export declare type ɵUnwrapDirectiveSignalInputs<Dir, Fields extends keyof Dir>
13555
13652
  [P in Fields]: ɵUnwrapInputSignalWriteType<Dir[P]>;
13556
13653
  };
13557
13654
 
13558
- /** Retrieves the `WriteT` of an `InputSignal` and `InputSignalWithTransform`. */
13655
+ /** Retrieves the write type of an `InputSignal` and `InputSignalWithTransform`. */
13559
13656
  declare type ɵUnwrapInputSignalWriteType<Field> = Field extends InputSignalWithTransform<any, infer WriteT> ? WriteT : never;
13560
13657
 
13561
13658
  export declare function ɵunwrapSafeValue(value: ɵSafeValue): string;
@@ -13820,7 +13917,7 @@ export declare function ɵwithDomHydration(): EnvironmentProviders;
13820
13917
  * Returns a set of providers required to setup support for i18n hydration.
13821
13918
  * Requires hydration to be enabled separately.
13822
13919
  */
13823
- export declare function ɵwithI18nHydration(): EnvironmentProviders;
13920
+ export declare function ɵwithI18nSupport(): Provider[];
13824
13921
 
13825
13922
  /**
13826
13923
  * Returns a writable type version of type.
@@ -13859,6 +13956,9 @@ declare const ɵWRITABLE_SIGNAL: unique symbol;
13859
13956
  */
13860
13957
  export declare const ɵXSS_SECURITY_URL = "https://g.co/ng/security#xss";
13861
13958
 
13959
+ /** Token used to indicate if zoneless was enabled via provideZonelessChangeDetection(). */
13960
+ export declare const ɵZONELESS_ENABLED: InjectionToken<boolean>;
13961
+
13862
13962
  /**
13863
13963
  * Advances to an element for later binding instructions.
13864
13964
  *
@@ -14534,8 +14634,6 @@ export declare function ɵɵcomponentInstance(): unknown;
14534
14634
  * built-in "if" and "switch". On the high level this instruction is responsible for adding and
14535
14635
  * removing views selected by a conditional expression.
14536
14636
  *
14537
- * @param containerIndex index of a container in a host view (indexed from HEADER_OFFSET) where
14538
- * conditional views should be inserted.
14539
14637
  * @param matchingTemplateIndex index of a template TNode representing a conditional view to be
14540
14638
  * inserted; -1 represents a special case when there is no view to insert.
14541
14639
  * @codeGenApi
@@ -15409,6 +15507,23 @@ export declare function ɵɵngDeclareClassMetadata(decl: {
15409
15507
  };
15410
15508
  }): void;
15411
15509
 
15510
+ /**
15511
+ * Evaluates the class metadata of a component that contains deferred blocks.
15512
+ *
15513
+ * @codeGenApi
15514
+ */
15515
+ export declare function ɵɵngDeclareClassMetadataAsync(decl: {
15516
+ type: Type<any>;
15517
+ resolveDeferredDeps: () => Promise<Type<unknown>>[];
15518
+ resolveMetadata: (...types: Type<unknown>[]) => {
15519
+ decorators: any[];
15520
+ ctorParameters: (() => any[]) | null;
15521
+ propDecorators: ({
15522
+ [field: string]: any;
15523
+ }) | null;
15524
+ };
15525
+ }): void;
15526
+
15412
15527
  /**
15413
15528
  * Compiles a partial component declaration object into a full component definition object.
15414
15529
  *
@@ -15584,14 +15699,19 @@ export declare type ɵɵPipeDeclaration<T, Name extends string, IsStandalone ext
15584
15699
  * Inserts previously re-distributed projected nodes. This instruction must be preceded by a call
15585
15700
  * to the projectionDef instruction.
15586
15701
  *
15587
- * @param nodeIndex
15588
- * @param selectorIndex:
15589
- * - 0 when the selector is `*` (or unspecified as this is the default value),
15590
- * - 1 based index of the selector from the {@link projectionDef}
15702
+ * @param nodeIndex Index of the projection node.
15703
+ * @param selectorIndex Index of the slot selector.
15704
+ * - 0 when the selector is `*` (or unspecified as this is the default value),
15705
+ * - 1 based index of the selector from the {@link projectionDef}
15706
+ * @param attrs Static attributes set on the `ng-content` node.
15707
+ * @param fallbackTemplateFn Template function with fallback content.
15708
+ * Will be rendered if the slot is empty at runtime.
15709
+ * @param fallbackDecls Number of declarations in the fallback template.
15710
+ * @param fallbackVars Number of variables in the fallback template.
15591
15711
  *
15592
15712
  * @codeGenApi
15593
15713
  */
15594
- export declare function ɵɵprojection(nodeIndex: number, selectorIndex?: number, attrs?: TAttributes): void;
15714
+ export declare function ɵɵprojection(nodeIndex: number, selectorIndex?: number, attrs?: TAttributes, fallbackTemplateFn?: ComponentTemplate<unknown>, fallbackDecls?: number, fallbackVars?: number): void;
15595
15715
 
15596
15716
  /**
15597
15717
  * Instruction to distribute projectable nodes among <ng-content> occurrences in a given template.