@angular/core 17.2.0-next.0 → 17.2.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.
Files changed (109) hide show
  1. package/esm2022/primitives/signals/index.mjs +3 -3
  2. package/esm2022/src/application/application_init.mjs +2 -2
  3. package/esm2022/src/application/application_ngmodule_factory_compiler.mjs +61 -0
  4. package/esm2022/src/application/application_ref.mjs +56 -70
  5. package/esm2022/src/application/application_tokens.mjs +10 -9
  6. package/esm2022/src/authoring/input/input.mjs +48 -0
  7. package/esm2022/src/authoring/input/input_signal.mjs +40 -0
  8. package/esm2022/src/authoring/input/input_signal_node.mjs +22 -0
  9. package/esm2022/src/authoring/input/input_type_checking.mjs +9 -0
  10. package/esm2022/src/authoring/model/model.mjs +50 -0
  11. package/esm2022/src/authoring/model/model_signal.mjs +68 -0
  12. package/esm2022/src/authoring/model/model_signal_node.mjs +21 -0
  13. package/esm2022/src/authoring/output.mjs +33 -0
  14. package/esm2022/src/authoring/queries.mjs +8 -7
  15. package/esm2022/src/authoring.mjs +3 -2
  16. package/esm2022/src/change_detection/scheduling/zoneless_scheduling_impl.mjs +51 -18
  17. package/esm2022/src/core.mjs +7 -5
  18. package/esm2022/src/core_private_export.mjs +2 -2
  19. package/esm2022/src/core_reactivity_export_internal.mjs +2 -2
  20. package/esm2022/src/core_render3_private_export.mjs +5 -4
  21. package/esm2022/src/defer/instructions.mjs +16 -7
  22. package/esm2022/src/di/create_injector.mjs +1 -1
  23. package/esm2022/src/di/forward_ref.mjs +1 -1
  24. package/esm2022/src/di/initializer_token.mjs +2 -2
  25. package/esm2022/src/di/injector.mjs +4 -4
  26. package/esm2022/src/di/injector_compatibility.mjs +1 -1
  27. package/esm2022/src/di/injector_token.mjs +2 -2
  28. package/esm2022/src/di/internal_tokens.mjs +2 -2
  29. package/esm2022/src/di/null_injector.mjs +1 -1
  30. package/esm2022/src/di/r3_injector.mjs +1 -1
  31. package/esm2022/src/di/scope.mjs +2 -2
  32. package/esm2022/src/errors.mjs +1 -1
  33. package/esm2022/src/hydration/error_handling.mjs +17 -6
  34. package/esm2022/src/hydration/utils.mjs +54 -8
  35. package/esm2022/src/i18n/tokens.mjs +5 -5
  36. package/esm2022/src/linker/compiler.mjs +2 -2
  37. package/esm2022/src/linker/query_list.mjs +7 -1
  38. package/esm2022/src/metadata/di.mjs +1 -1
  39. package/esm2022/src/platform/platform.mjs +2 -2
  40. package/esm2022/src/platform/platform_ref.mjs +4 -3
  41. package/esm2022/src/render3/after_render_hooks.mjs +2 -6
  42. package/esm2022/src/render3/apply_value_input_field.mjs +1 -1
  43. package/esm2022/src/render3/component_ref.mjs +2 -2
  44. package/esm2022/src/render3/definition.mjs +2 -2
  45. package/esm2022/src/render3/di.mjs +1 -1
  46. package/esm2022/src/render3/errors_di.mjs +2 -2
  47. package/esm2022/src/render3/features/ng_onchanges_feature.mjs +1 -1
  48. package/esm2022/src/render3/i18n/i18n_locale_id.mjs +2 -2
  49. package/esm2022/src/render3/index.mjs +2 -2
  50. package/esm2022/src/render3/instructions/all.mjs +3 -1
  51. package/esm2022/src/render3/instructions/change_detection.mjs +6 -6
  52. package/esm2022/src/render3/instructions/element.mjs +3 -3
  53. package/esm2022/src/render3/instructions/listener.mjs +13 -4
  54. package/esm2022/src/render3/instructions/queries.mjs +7 -43
  55. package/esm2022/src/render3/instructions/queries_signals.mjs +54 -0
  56. package/esm2022/src/render3/instructions/render.mjs +5 -2
  57. package/esm2022/src/render3/instructions/shared.mjs +2 -2
  58. package/esm2022/src/render3/instructions/styling.mjs +1 -1
  59. package/esm2022/src/render3/instructions/two_way.mjs +70 -0
  60. package/esm2022/src/render3/instructions/write_to_directive_input.mjs +2 -2
  61. package/esm2022/src/render3/interfaces/attribute_marker.mjs +9 -0
  62. package/esm2022/src/render3/interfaces/definition.mjs +2 -8
  63. package/esm2022/src/render3/interfaces/input_flags.mjs +15 -0
  64. package/esm2022/src/render3/interfaces/node.mjs +1 -1
  65. package/esm2022/src/render3/interfaces/query.mjs +1 -1
  66. package/esm2022/src/render3/interfaces/view.mjs +1 -1
  67. package/esm2022/src/render3/jit/environment.mjs +5 -2
  68. package/esm2022/src/render3/node_selector_matcher.mjs +1 -1
  69. package/esm2022/src/render3/query.mjs +62 -9
  70. package/esm2022/src/render3/query_reactive.mjs +86 -0
  71. package/esm2022/src/render3/reactivity/computed.mjs +4 -1
  72. package/esm2022/src/render3/reactivity/signal.mjs +24 -1
  73. package/esm2022/src/render3/styling/static_styling.mjs +1 -1
  74. package/esm2022/src/render3/util/attrs_utils.mjs +1 -1
  75. package/esm2022/src/render3/util/discovery_utils.mjs +1 -1
  76. package/esm2022/src/render3/util/view_utils.mjs +3 -3
  77. package/esm2022/src/render3/view_ref.mjs +1 -1
  78. package/esm2022/src/util/ng_dev_mode.mjs +11 -3
  79. package/esm2022/src/util/stringify.mjs +2 -2
  80. package/esm2022/src/version.mjs +1 -1
  81. package/esm2022/testing/src/component_fixture.mjs +127 -92
  82. package/esm2022/testing/src/logger.mjs +3 -3
  83. package/esm2022/testing/src/test_bed.mjs +11 -6
  84. package/esm2022/testing/src/test_bed_common.mjs +9 -2
  85. package/esm2022/testing/src/test_bed_compiler.mjs +5 -4
  86. package/esm2022/testing/src/testing.mjs +2 -2
  87. package/fesm2022/core.mjs +15622 -14998
  88. package/fesm2022/core.mjs.map +1 -1
  89. package/fesm2022/primitives/signals.mjs +2 -2
  90. package/fesm2022/rxjs-interop.mjs +1 -1
  91. package/fesm2022/testing.mjs +142 -95
  92. package/fesm2022/testing.mjs.map +1 -1
  93. package/index.d.ts +477 -27
  94. package/package.json +1 -1
  95. package/primitives/signals/index.d.ts +4 -2
  96. package/rxjs-interop/index.d.ts +1 -1
  97. package/schematics/migrations/block-template-entities/bundle.js +652 -295
  98. package/schematics/migrations/block-template-entities/bundle.js.map +4 -4
  99. package/schematics/migrations/compiler-options/bundle.js +13 -13
  100. package/schematics/migrations/transfer-state/bundle.js +13 -13
  101. package/schematics/ng-generate/control-flow-migration/bundle.js +662 -305
  102. package/schematics/ng-generate/control-flow-migration/bundle.js.map +4 -4
  103. package/schematics/ng-generate/standalone-migration/bundle.js +7001 -6270
  104. package/schematics/ng-generate/standalone-migration/bundle.js.map +4 -4
  105. package/testing/index.d.ts +6 -17
  106. package/esm2022/src/authoring/input.mjs +0 -48
  107. package/esm2022/src/authoring/input_signal.mjs +0 -37
  108. package/esm2022/src/authoring/input_signal_node.mjs +0 -22
  109. package/esm2022/src/authoring/input_type_checking.mjs +0 -9
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v17.2.0-next.0
2
+ * @license Angular v17.2.0-rc.0
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -332,7 +332,7 @@ export declare interface AfterViewInit {
332
332
  }
333
333
 
334
334
  /**
335
- * A [DI token](guide/glossary#di-token "DI token definition") that indicates which animations
335
+ * A [DI token](api/core/InjectionToken) that indicates which animations
336
336
  * module has been loaded.
337
337
  * @publicApi
338
338
  */
@@ -756,6 +756,8 @@ export declare class ApplicationRef {
756
756
  * detection pass during which all change detection must complete.
757
757
  */
758
758
  tick(): void;
759
+ private detectChangesInAttachedViews;
760
+ private detectChangesInView;
759
761
  /**
760
762
  * Attaches a view so that it will be dirty checked.
761
763
  * The view will be automatically detached when it is destroyed.
@@ -1879,6 +1881,26 @@ export declare type ContentChild = Query;
1879
1881
  */
1880
1882
  export declare const ContentChild: ContentChildDecorator;
1881
1883
 
1884
+ /**
1885
+ * Initializes a content child query. Consider using `contentChild.required` for queries that should
1886
+ * always match.
1887
+ *
1888
+ * @usageNotes
1889
+ * Create a child query in your component by declaring a
1890
+ * class field and initializing it with the `contentChild()` function.
1891
+ *
1892
+ * ```ts
1893
+ * @Component({...})
1894
+ * export class TestComponent {
1895
+ * headerEl = contentChild<ElementRef>('h'); // Signal<ElementRef|undefined>
1896
+ * headerElElRequired = contentChild.required<ElementRef>('h'); // Signal<ElementRef>
1897
+ * header = contentChild(MyHeader); // Signal<MyHeader|undefined>
1898
+ * headerRequired = contentChild.required(MyHeader); // Signal<MyHeader>
1899
+ * }
1900
+ * ```
1901
+ */
1902
+ export declare const contentChild: ContentChildFunction;
1903
+
1882
1904
  /**
1883
1905
  * Type of the ContentChild decorator / constructor function.
1884
1906
  *
@@ -1956,6 +1978,46 @@ export declare interface ContentChildDecorator {
1956
1978
  }): ContentChild;
1957
1979
  }
1958
1980
 
1981
+ /**
1982
+ * Type of the `contentChild` function.
1983
+ *
1984
+ * The contentChild function creates a singular content query. It is a special function that also
1985
+ * provides access to required query results via the `.required` property.
1986
+ *
1987
+ * @developerPreview
1988
+ */
1989
+ export declare interface ContentChildFunction {
1990
+ /**
1991
+ * Initializes a content child query.
1992
+ *
1993
+ * Consider using `contentChild.required` for queries that should always match.
1994
+ * @developerPreview
1995
+ */
1996
+ <LocatorT>(locator: ProviderToken<LocatorT> | string, opts?: {
1997
+ descendants?: boolean;
1998
+ read?: undefined;
1999
+ }): Signal<LocatorT | undefined>;
2000
+ <LocatorT, ReadT>(locator: ProviderToken<LocatorT> | string, opts: {
2001
+ descendants?: boolean;
2002
+ read: ProviderToken<ReadT>;
2003
+ }): Signal<ReadT | undefined>;
2004
+ /**
2005
+ * Initializes a content child query that is always expected to match.
2006
+ *
2007
+ * @developerPreview
2008
+ */
2009
+ required: {
2010
+ <LocatorT>(locator: ProviderToken<LocatorT> | string, opts?: {
2011
+ descendants?: boolean;
2012
+ read?: undefined;
2013
+ }): Signal<LocatorT>;
2014
+ <LocatorT, ReadT>(locator: ProviderToken<LocatorT> | string, opts: {
2015
+ descendants?: boolean;
2016
+ read: ProviderToken<ReadT>;
2017
+ }): Signal<ReadT>;
2018
+ };
2019
+ }
2020
+
1959
2021
  /**
1960
2022
  * Type of the ContentChildren metadata.
1961
2023
  *
@@ -1974,6 +2036,16 @@ export declare type ContentChildren = Query;
1974
2036
  */
1975
2037
  export declare const ContentChildren: ContentChildrenDecorator;
1976
2038
 
2039
+ export declare function contentChildren<LocatorT>(locator: ProviderToken<LocatorT> | string, opts?: {
2040
+ descendants?: boolean;
2041
+ read?: undefined;
2042
+ }): Signal<ReadonlyArray<LocatorT>>;
2043
+
2044
+ export declare function contentChildren<LocatorT, ReadT>(locator: ProviderToken<LocatorT> | string, opts: {
2045
+ descendants?: boolean;
2046
+ read: ProviderToken<ReadT>;
2047
+ }): Signal<ReadonlyArray<ReadT>>;
2048
+
1977
2049
  /**
1978
2050
  * Type of the ContentChildren decorator / constructor function.
1979
2051
  *
@@ -3327,9 +3399,7 @@ declare type DirectiveDefListOrFactory = (() => DirectiveDefList) | DirectiveDef
3327
3399
  * - Because declared and public name are usually same we only generate the array
3328
3400
  * `['declared', 'public']` format when they differ, or there is a transform.
3329
3401
  * - The reason why this API and `outputs` API is not the same is that `NgOnChanges` has
3330
- * inconsistent behavior in that it uses declared names rather than minified or public. For
3331
- * this reason `NgOnChanges` will be deprecated and removed in future version and this
3332
- * API will be simplified to be consistent with `output`.
3402
+ * inconsistent behavior in that it uses declared names rather than minified or public.
3333
3403
  */
3334
3404
  declare type DirectiveInputs<T> = {
3335
3405
  [P in keyof T]?: string | [
@@ -3925,7 +3995,7 @@ declare const FLAGS = 2;
3925
3995
  export declare function forwardRef(forwardRefFn: ForwardRefFn): Type<any>;
3926
3996
 
3927
3997
  /**
3928
- * An interface that a function passed into {@link forwardRef} has to implement.
3998
+ * An interface that a function passed into `forwardRef` has to implement.
3929
3999
  *
3930
4000
  * @usageNotes
3931
4001
  * ### Example
@@ -4545,6 +4615,18 @@ export declare interface HostListenerDecorator {
4545
4615
 
4546
4616
  declare const HYDRATION = 6;
4547
4617
 
4618
+ declare const HYDRATION_INFO_KEY = "__ngDebugHydrationInfo__";
4619
+
4620
+ /**
4621
+ * Internal type that represents a claimed node.
4622
+ * Only used in dev mode.
4623
+ */
4624
+ declare enum HydrationStatus {
4625
+ Hydrated = "hydrated",
4626
+ Skipped = "skipped",
4627
+ Mismatched = "mismatched"
4628
+ }
4629
+
4548
4630
  declare namespace i0 {
4549
4631
  export {
4550
4632
  ɵɵinject,
@@ -5211,10 +5293,10 @@ export declare const INJECTOR: InjectionToken<Injector>;
5211
5293
 
5212
5294
  /**
5213
5295
  * Concrete injectors implement this interface. Injectors are configured
5214
- * with [providers](guide/glossary#provider) that associate
5215
- * dependencies of various types with [injection tokens](guide/glossary#di-token).
5296
+ * with [providers](guide/dependency-injection-providers) that associate
5297
+ * dependencies of various types with [injection tokens](guide/dependency-injection-providers).
5216
5298
  *
5217
- * @see ["DI Providers"](guide/dependency-injection-providers).
5299
+ * @see [DI Providers](guide/dependency-injection-providers).
5218
5300
  * @see {@link StaticProvider}
5219
5301
  *
5220
5302
  * @usageNotes
@@ -5478,7 +5560,7 @@ export declare interface InputFunction {
5478
5560
  */
5479
5561
  <ReadT>(): InputSignal<ReadT | undefined>;
5480
5562
  <ReadT>(initialValue: ReadT, opts?: InputOptionsWithoutTransform<ReadT>): InputSignal<ReadT>;
5481
- <ReadT, WriteT>(initialValue: ReadT, opts: InputOptionsWithTransform<ReadT, WriteT>): InputSignal<ReadT, WriteT>;
5563
+ <ReadT, WriteT>(initialValue: ReadT, opts: InputOptionsWithTransform<ReadT, WriteT>): InputSignalWithTransform<ReadT, WriteT>;
5482
5564
  /**
5483
5565
  * Initializes a required input.
5484
5566
  *
@@ -5489,7 +5571,7 @@ export declare interface InputFunction {
5489
5571
  */
5490
5572
  required: {
5491
5573
  <ReadT>(opts?: InputOptionsWithoutTransform<ReadT>): InputSignal<ReadT>;
5492
- <ReadT, WriteT>(opts: InputOptionsWithTransform<ReadT, WriteT>): InputSignal<ReadT, WriteT>;
5574
+ <ReadT, WriteT>(opts: InputOptionsWithTransform<ReadT, WriteT>): InputSignalWithTransform<ReadT, WriteT>;
5493
5575
  };
5494
5576
  }
5495
5577
 
@@ -5531,18 +5613,17 @@ export declare type InputOptionsWithoutTransform<ReadT> = Omit<InputOptions<Read
5531
5613
  export declare type InputOptionsWithTransform<ReadT, WriteT> = Required<Pick<InputOptions<ReadT, WriteT>, 'transform'>> & InputOptions<ReadT, WriteT>;
5532
5614
 
5533
5615
  /**
5534
- * `InputSignal` is represents a special `Signal` for a directive/component input.
5616
+ * `InputSignal` represents a special `Signal` for a directive/component input.
5535
5617
  *
5536
5618
  * An input signal is similar to a non-writable signal except that it also
5537
5619
  * carries additional type-information for transforms, and that Angular internally
5538
5620
  * updates the signal whenever a new value is bound.
5539
5621
  *
5622
+ * @see {@link InputOptionsWithTransform} for inputs with transforms.
5623
+ *
5540
5624
  * @developerPreview
5541
5625
  */
5542
- export declare interface InputSignal<ReadT, WriteT = ReadT> extends Signal<ReadT> {
5543
- [SIGNAL]: InputSignalNode<ReadT, WriteT>;
5544
- [ɵINPUT_SIGNAL_BRAND_READ_TYPE]: ReadT;
5545
- [ɵINPUT_SIGNAL_BRAND_WRITE_TYPE]: WriteT;
5626
+ export declare interface InputSignal<ReadT> extends InputSignalWithTransform<ReadT, ReadT> {
5546
5627
  }
5547
5628
 
5548
5629
  /**
@@ -5566,6 +5647,36 @@ declare interface InputSignalNode<ReadT, WriteT> extends SignalNode<ReadT | type
5566
5647
  applyValueToInputSignal<ReadT, WriteT>(node: InputSignalNode<ReadT, WriteT>, value: ReadT): void;
5567
5648
  }
5568
5649
 
5650
+ /**
5651
+ * `InputSignalWithTransform` represents a special `Signal` for a
5652
+ * directive/component input with a `transform` function.
5653
+ *
5654
+ * Signal inputs with transforms capture an extra generic for their transform write
5655
+ * type. Transforms can expand the accepted bound values for an input while ensuring
5656
+ * value retrievals of the signal input are still matching the generic input type.
5657
+ *
5658
+ * ```ts
5659
+ * class MyDir {
5660
+ * disabled = input(false, {
5661
+ * transform: (v: string|boolean) => convertToBoolean(v),
5662
+ * }); // InputSignalWithTransform<boolean, string|boolean>
5663
+ *
5664
+ * click() {
5665
+ * this.disabled() // always returns a `boolean`.
5666
+ * }
5667
+ * }
5668
+ * ```
5669
+ *
5670
+ * @see {@link InputSignal} for additional information.
5671
+ *
5672
+ * @developerPreview
5673
+ */
5674
+ export declare interface InputSignalWithTransform<ReadT, WriteT> extends Signal<ReadT> {
5675
+ [SIGNAL]: InputSignalNode<ReadT, WriteT>;
5676
+ [ɵINPUT_SIGNAL_BRAND_READ_TYPE]: ReadT;
5677
+ [ɵINPUT_SIGNAL_BRAND_WRITE_TYPE]: WriteT;
5678
+ }
5679
+
5569
5680
  /** Function that can be used to transform incoming input values. */
5570
5681
  declare type InputTransformFunction = (value: any) => any;
5571
5682
 
@@ -6092,6 +6203,14 @@ declare interface LQueries {
6092
6203
  * @param tView
6093
6204
  */
6094
6205
  detachView(tView: TView): void;
6206
+ /**
6207
+ * A method called when a view finishes its creation pass. As a result all impacted
6208
+ * `LQuery` objects (and associated `QueryList`) are marked as dirty. This additional dirty
6209
+ * marking gives us a precise point in time where we can collect results for a given view in an
6210
+ * atomic way.
6211
+ * @param tView
6212
+ */
6213
+ finishViewCreation(tView: TView): void;
6095
6214
  }
6096
6215
 
6097
6216
  /**
@@ -6515,6 +6634,118 @@ export declare enum MissingTranslationStrategy {
6515
6634
  Ignore = 2
6516
6635
  }
6517
6636
 
6637
+ /**
6638
+ * `model` declares a writeable signal that is exposed as an input/output pair on the containing
6639
+ * directive. The input name is taken either from the class member or from the `alias` option.
6640
+ * The output name is generated by taking the input name and appending `Change`.
6641
+ *
6642
+ * Initializes a model with an initial value. If no explicit value
6643
+ * is specified, Angular will use `undefined`.
6644
+ *
6645
+ * Consider using `model.required` for models that don't need an
6646
+ * initial value.
6647
+ *
6648
+ * @usageNotes
6649
+ * Initialize a model in your directive or component by declaring a
6650
+ * class field and initializing it with the `model()` or `model.required()`
6651
+ * function.
6652
+ *
6653
+ * ```ts
6654
+ * @Directive({..})
6655
+ * export class MyDir {
6656
+ * firstName = model<string>(); // string|undefined
6657
+ * lastName = model.required<string>(); // string
6658
+ * age = model(0); // number
6659
+ * }
6660
+ * ```
6661
+ *
6662
+ * @developerPreview
6663
+ */
6664
+ export declare const model: ModelFunction;
6665
+
6666
+ /**
6667
+ * `model` declares a writeable signal that is exposed as an input/output pair on the containing
6668
+ * directive. The input name is taken either from the class member or from the `alias` option.
6669
+ * The output name is generated by taking the input name and appending `Change`.
6670
+ *
6671
+ * The function exposes an API for also declaring required models via the
6672
+ * `model.required` function.
6673
+ *
6674
+ * @usageNotes
6675
+ * Initialize a model in your directive or component by declaring a
6676
+ * class field and initializing it with the `model()` or `model.required()`
6677
+ * function.
6678
+ *
6679
+ * ```ts
6680
+ * @Directive({..})
6681
+ * export class MyDir {
6682
+ * firstName = model<string>(); // string|undefined
6683
+ * lastName = model.required<string>(); // string
6684
+ * age = model(0); // number
6685
+ * }
6686
+ * ```
6687
+ *
6688
+ * @developerPreview
6689
+ */
6690
+ export declare interface ModelFunction {
6691
+ /**
6692
+ * Initializes a model with an initial value. If no explicit value
6693
+ * is specified, Angular will use `undefined`.
6694
+ *
6695
+ * Consider using `model.required` for models that don't need an
6696
+ * initial value.
6697
+ *
6698
+ * @developerPreview
6699
+ */
6700
+ <T>(): ModelSignal<T | undefined>;
6701
+ <T>(initialValue: T, opts?: ModelOptions): ModelSignal<T>;
6702
+ /**
6703
+ * Initializes a required model.
6704
+ *
6705
+ * Users of your directive/component need to bind to the input side of the model.
6706
+ * If unset, a compile time error will be reported.
6707
+ *
6708
+ * @developerPreview
6709
+ */
6710
+ required<T>(opts?: ModelOptions): ModelSignal<T>;
6711
+ }
6712
+
6713
+ /**
6714
+ * @developerPreview
6715
+ *
6716
+ * Options for model signals.
6717
+ */
6718
+ export declare interface ModelOptions {
6719
+ /**
6720
+ * Optional public name of the input side of the model. The output side will have the same
6721
+ * name as the input, but suffixed with `Change`. By default, the class field name is used.
6722
+ */
6723
+ alias?: string;
6724
+ }
6725
+
6726
+ /**
6727
+ * `ModelSignal` represents a special `Signal` for a directive/component model field.
6728
+ *
6729
+ * A model signal is a writeable signal that can be exposed as an output.
6730
+ * Whenever its value is updated, it emits to the output.
6731
+ *
6732
+ * @developerPreview
6733
+ */
6734
+ export declare interface ModelSignal<T> extends WritableSignal<T> {
6735
+ [SIGNAL]: ModelSignalNode<T>;
6736
+ [ɵINPUT_SIGNAL_BRAND_READ_TYPE]: T;
6737
+ [ɵINPUT_SIGNAL_BRAND_WRITE_TYPE]: T;
6738
+ }
6739
+
6740
+ /**
6741
+ * Reactive node type for a model signal. Model signals extend
6742
+ * signals by adding the ability to track subscriptions and to be required.
6743
+ */
6744
+ declare interface ModelSignalNode<T> extends SignalNode<T> {
6745
+ /** Used by the runtime to write a value to the signal input. */
6746
+ applyValueToInputSignal: (node: ModelSignalNode<T>, value: T) => void;
6747
+ }
6748
+
6518
6749
  /**
6519
6750
  * Combination of NgModuleFactory and ComponentFactories.
6520
6751
  *
@@ -7713,6 +7944,7 @@ declare const enum QueryFlags {
7713
7944
  export declare class QueryList<T> implements Iterable<T> {
7714
7945
  private _emitDistinctChangesOnly;
7715
7946
  readonly dirty = true;
7947
+ private _onDirty?;
7716
7948
  private _results;
7717
7949
  private _changesDetected;
7718
7950
  private _changes;
@@ -10620,6 +10852,29 @@ export declare type ViewChild = Query;
10620
10852
  */
10621
10853
  export declare const ViewChild: ViewChildDecorator;
10622
10854
 
10855
+ /**
10856
+ * Initializes a view child query.
10857
+ *
10858
+ * Consider using `viewChild.required` for queries that should always match.
10859
+ *
10860
+ * @usageNotes
10861
+ * Create a child query in your component by declaring a
10862
+ * class field and initializing it with the `viewChild()` function.
10863
+ *
10864
+ * ```ts
10865
+ * @Component({template: '<div #el></div><my-component #cmp />'})
10866
+ * export class TestComponent {
10867
+ * divEl = viewChild<ElementRef>('el'); // Signal<ElementRef|undefined>
10868
+ * divElRequired = viewChild.required<ElementRef>('el'); // Signal<ElementRef>
10869
+ * cmp = viewChild(MyComponent); // Signal<MyComponent|undefined>
10870
+ * cmpRequired = viewChild.required(MyComponent); // Signal<MyComponent>
10871
+ * }
10872
+ * ```
10873
+ *
10874
+ * @developerPreview
10875
+ */
10876
+ export declare const viewChild: ViewChildFunction;
10877
+
10623
10878
  /**
10624
10879
  * Type of the ViewChild decorator / constructor function.
10625
10880
  *
@@ -10673,6 +10928,8 @@ export declare interface ViewChildDecorator {
10673
10928
  *
10674
10929
  * @usageNotes
10675
10930
  *
10931
+ * ### Example 1
10932
+ *
10676
10933
  * {@example core/di/ts/viewChild/view_child_example.ts region='Component'}
10677
10934
  *
10678
10935
  * ### Example 2
@@ -10691,6 +10948,38 @@ export declare interface ViewChildDecorator {
10691
10948
  }): ViewChild;
10692
10949
  }
10693
10950
 
10951
+ /**
10952
+ * Type of the `viewChild` function. The viewChild function creates a singular view query.
10953
+ *
10954
+ * It is a special function that also provides access to required query results via the `.required`
10955
+ * property.
10956
+ *
10957
+ * @developerPreview
10958
+ */
10959
+ export declare interface ViewChildFunction {
10960
+ /**
10961
+ * Initializes a view child query. Consider using `viewChild.required` for queries that should
10962
+ * always match.
10963
+ *
10964
+ * @developerPreview
10965
+ */
10966
+ <LocatorT>(locator: ProviderToken<LocatorT> | string): Signal<LocatorT | undefined>;
10967
+ <LocatorT, ReadT>(locator: ProviderToken<LocatorT> | string, opts: {
10968
+ read: ProviderToken<ReadT>;
10969
+ }): Signal<ReadT | undefined>;
10970
+ /**
10971
+ * Initializes a view child query that is expected to always match an element.
10972
+ *
10973
+ * @developerPreview
10974
+ */
10975
+ required: {
10976
+ <LocatorT>(locator: ProviderToken<LocatorT> | string): Signal<LocatorT>;
10977
+ <LocatorT, ReadT>(locator: ProviderToken<LocatorT> | string, opts: {
10978
+ read: ProviderToken<ReadT>;
10979
+ }): Signal<ReadT>;
10980
+ };
10981
+ }
10982
+
10694
10983
  /**
10695
10984
  * Type of the ViewChildren metadata.
10696
10985
  *
@@ -10706,6 +10995,12 @@ export declare type ViewChildren = Query;
10706
10995
  */
10707
10996
  export declare const ViewChildren: ViewChildrenDecorator;
10708
10997
 
10998
+ export declare function viewChildren<LocatorT>(locator: ProviderToken<LocatorT> | string): Signal<ReadonlyArray<LocatorT>>;
10999
+
11000
+ export declare function viewChildren<LocatorT, ReadT>(locator: ProviderToken<LocatorT> | string, opts: {
11001
+ read: ProviderToken<ReadT>;
11002
+ }): Signal<ReadonlyArray<ReadT>>;
11003
+
10709
11004
  /**
10710
11005
  * Type of the ViewChildren decorator / constructor function.
10711
11006
  *
@@ -11057,10 +11352,14 @@ declare interface ViewRefTracker {
11057
11352
  detachView(viewRef: ViewRef): void;
11058
11353
  }
11059
11354
 
11355
+ /** Symbol used distinguish `WritableSignal` from other non-writable signals and functions. */
11356
+ declare const WRITABLE_SIGNAL: unique symbol;
11357
+
11060
11358
  /**
11061
11359
  * A `Signal` with a value that can be mutated via a setter interface.
11062
11360
  */
11063
11361
  export declare interface WritableSignal<T> extends Signal<T> {
11362
+ [WRITABLE_SIGNAL]: T;
11064
11363
  /**
11065
11364
  * Directly set the signal to a new value, and notify any dependents.
11066
11365
  */
@@ -11095,7 +11394,7 @@ export declare class ɵAfterRenderEventManager {
11095
11394
  /**
11096
11395
  * Executes callbacks. Returns `true` if any callbacks executed.
11097
11396
  */
11098
- execute(): boolean;
11397
+ execute(): void;
11099
11398
  ngOnDestroy(): void;
11100
11399
  /** @nocollapse */
11101
11400
  static ɵprov: unknown;
@@ -11139,6 +11438,7 @@ export declare const enum ɵAnimationRendererType {
11139
11438
  */
11140
11439
  export declare function ɵannotateForHydration(appRef: ApplicationRef, doc: Document): void;
11141
11440
 
11441
+
11142
11442
  /**
11143
11443
  * A set of marker values to be used in the attributes arrays. These markers indicate that some
11144
11444
  * items are not regular attributes and the processing should be adapted accordingly.
@@ -11573,9 +11873,11 @@ export declare const ɵDEFER_BLOCK_CONFIG: InjectionToken<ɵDeferBlockConfig>;
11573
11873
 
11574
11874
  /**
11575
11875
  * **INTERNAL**, avoid referencing it in application code.
11576
- *
11876
+ * *
11577
11877
  * Injector token that allows to provide `DeferBlockDependencyInterceptor` class
11578
11878
  * implementation.
11879
+ *
11880
+ * This token is only injected in devMode
11579
11881
  */
11580
11882
  export declare const ɵDEFER_BLOCK_DEPENDENCY_INTERCEPTOR: InjectionToken<ɵDeferBlockDependencyInterceptor>;
11581
11883
 
@@ -11999,6 +12301,18 @@ export declare type ɵGlobalDevModeUtils = {
11999
12301
  [GLOBAL_PUBLISH_EXPANDO_KEY]: typeof globalUtilsFunctions;
12000
12302
  };
12001
12303
 
12304
+ export declare type ɵHydratedNode = {
12305
+ [HYDRATION_INFO_KEY]?: ɵHydrationInfo;
12306
+ };
12307
+
12308
+ export declare type ɵHydrationInfo = {
12309
+ status: HydrationStatus.Hydrated | HydrationStatus.Skipped;
12310
+ } | {
12311
+ status: HydrationStatus.Mismatched;
12312
+ actualNodeDetails: string | null;
12313
+ expectedNodeDetails: string | null;
12314
+ };
12315
+
12002
12316
  /**
12003
12317
  * Injection token that configures the image optimized image functionality.
12004
12318
  * See {@link ImageConfig} for additional information about parameters that
@@ -12027,6 +12341,7 @@ export declare const ɵIMAGE_CONFIG_DEFAULTS: ɵImageConfig;
12027
12341
  */
12028
12342
  export declare type ɵImageConfig = {
12029
12343
  breakpoints?: number[];
12344
+ placeholderResolution?: number;
12030
12345
  disableImageSizeWarning?: boolean;
12031
12346
  disableImageLazyLoadWarning?: boolean;
12032
12347
  };
@@ -12365,6 +12680,56 @@ export declare function ɵnoSideEffects<T>(fn: () => T): T;
12365
12680
 
12366
12681
  export declare const ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR: {};
12367
12682
 
12683
+ /**
12684
+ * The `outputs` function allows declaration of outputs in directives and
12685
+ * components.
12686
+ *
12687
+ * Initializes an output that can emit values to consumers of your
12688
+ * directive/component.
12689
+ *
12690
+ * @usageNotes
12691
+ * Initialize an output in your directive by declaring a
12692
+ * class field and initializing it with the `output()` function.
12693
+ *
12694
+ * ```ts
12695
+ * @Directive({..})
12696
+ * export class MyDir {
12697
+ * nameChange = output<string>(); // OutputEmitter<string>
12698
+ * onClick = output(); // OutputEmitter<void>
12699
+ * }
12700
+ * ```
12701
+ *
12702
+ * @developerPreview
12703
+ */
12704
+ export declare function ɵoutput<T = void>(opts?: ɵOutputOptions): ɵOutputEmitter<T>;
12705
+
12706
+
12707
+ /**
12708
+ * An `OutputEmitter` is created by the `output()` function and can be
12709
+ * used to emit values to consumers of your directive or component.
12710
+ *
12711
+ * Consumers of your directive/component can bind to the output and
12712
+ * subscribe to changes via the bound event syntax. For example:
12713
+ *
12714
+ * ```html
12715
+ * <my-comp (valueChange)="processNewValue($event)" />
12716
+ * ```
12717
+ *
12718
+ * @developerPreview
12719
+ */
12720
+ export declare interface ɵOutputEmitter<T> {
12721
+ emit(value: T): void;
12722
+ }
12723
+
12724
+ /**
12725
+ * Options for declaring an output.
12726
+ *
12727
+ * @developerPreview
12728
+ */
12729
+ export declare interface ɵOutputOptions {
12730
+ alias?: string;
12731
+ }
12732
+
12368
12733
  /**
12369
12734
  * Patch the definition of a component with directives and pipes from the compilation scope of
12370
12735
  * a given module.
@@ -12524,6 +12889,8 @@ export declare interface ɵProviderRecord {
12524
12889
 
12525
12890
  export declare function ɵprovideZonelessChangeDetection(): EnvironmentProviders;
12526
12891
 
12892
+ export declare function ɵreadHydrationInfo(node: RNode): ɵHydrationInfo | null;
12893
+
12527
12894
  export declare class ɵReflectionCapabilities implements PlatformReflectionCapabilities {
12528
12895
  private _reflect;
12529
12896
  constructor(reflect?: any);
@@ -12790,6 +13157,8 @@ export declare const enum ɵRuntimeErrorCode {
12790
13157
  COMPONENT_ID_COLLISION = -912,
12791
13158
  IMAGE_PERFORMANCE_WARNING = -913,
12792
13159
  REQUIRED_INPUT_NO_VALUE = -950,
13160
+ REQUIRED_QUERY_NO_VALUE = -951,
13161
+ REQUIRED_MODEL_NO_VALUE = -952,
12793
13162
  RUNTIME_DEPS_INVALID_IMPORTED_TYPE = 1000,
12794
13163
  RUNTIME_DEPS_ORPHAN_COMPONENT = 1001
12795
13164
  }
@@ -12970,7 +13339,7 @@ export declare function ɵtriggerResourceLoading(tDetails: TDeferBlockDetails, l
12970
13339
  *
12971
13340
  * @param string
12972
13341
  * @param maxLength of the output string
12973
- * @returns elispsed string with ... in the middle
13342
+ * @returns ellipsed string with ... in the middle
12974
13343
  */
12975
13344
  export declare function ɵtruncateMiddle(str: string, maxLength?: number): string;
12976
13345
 
@@ -12979,18 +13348,29 @@ export declare function ɵtruncateMiddle(str: string, maxLength?: number): strin
12979
13348
  */
12980
13349
  export declare function ɵunregisterLocaleData(): void;
12981
13350
 
12982
- /** Unwraps all `InputSignal` class fields of the given directive. */
13351
+ /**
13352
+ * Unwraps all `InputSignal`/`InputSignalWithTransform` class fields of
13353
+ * the given directive.
13354
+ */
12983
13355
  export declare type ɵUnwrapDirectiveSignalInputs<Dir, Fields extends keyof Dir> = {
12984
13356
  [P in Fields]: ɵUnwrapInputSignalWriteType<Dir[P]>;
12985
13357
  };
12986
13358
 
12987
- /** Retrieves the `WriteT` of an `InputSignal`. */
12988
- declare type ɵUnwrapInputSignalWriteType<Field> = Field extends InputSignal<unknown, infer WriteT> ? WriteT : never;
13359
+ /** Retrieves the `WriteT` of an `InputSignal` and `InputSignalWithTransform`. */
13360
+ declare type ɵUnwrapInputSignalWriteType<Field> = Field extends InputSignalWithTransform<unknown, infer WriteT> ? WriteT : never;
12989
13361
 
12990
13362
  export declare function ɵunwrapSafeValue(value: ɵSafeValue): string;
12991
13363
 
12992
13364
  export declare function ɵunwrapSafeValue<T>(value: T): T;
12993
13365
 
13366
+ /**
13367
+ * Utility function used during template type checking to extract the value from a `WritableSignal`.
13368
+ * @codeGenApi
13369
+ */
13370
+ export declare function ɵunwrapWritableSignal<T>(value: T | {
13371
+ [WRITABLE_SIGNAL]: T;
13372
+ }): T;
13373
+
12994
13374
  /**
12995
13375
  * Indicates whether to use the runtime dependency tracker for scope calculation in JIT compilation.
12996
13376
  * The value "false" means the old code path based on patching scope info into the types will be
@@ -13008,7 +13388,7 @@ export declare class ɵViewRef<T> implements EmbeddedViewRef<T>, ChangeDetectorR
13008
13388
  * This may be different from `_lView` if the `_cdRefInjectingView` is an embedded view.
13009
13389
  */
13010
13390
  private _cdRefInjectingView?;
13011
- private readonly notifyErrorHandler;
13391
+ readonly notifyErrorHandler: boolean;
13012
13392
  private _appRef;
13013
13393
  private _attachedToViewContainer;
13014
13394
  get rootNodes(): any[];
@@ -13968,7 +14348,18 @@ export declare function ɵɵconditional<T>(containerIndex: number, matchingTempl
13968
14348
  */
13969
14349
  export declare function ɵɵcontentQuery<T>(directiveIndex: number, predicate: ProviderToken<unknown> | string | string[], flags: QueryFlags, read?: any): void;
13970
14350
 
13971
- export declare function ɵɵcontentQuerySignal(): void;
14351
+ /**
14352
+ * Creates a new content query and binds it to a signal created by an authoring function.
14353
+ *
14354
+ * @param directiveIndex Current directive index
14355
+ * @param target The target signal to which the query should be bound
14356
+ * @param predicate The type for which the query will search
14357
+ * @param flags Flags associated with the query
14358
+ * @param read What to save in the query
14359
+ *
14360
+ * @codeGenApi
14361
+ */
14362
+ export declare function ɵɵcontentQuerySignal<T>(directiveIndex: number, target: Signal<T>, predicate: ProviderToken<unknown> | string[], flags: QueryFlags, read?: any): void;
13972
14363
 
13973
14364
  /**
13974
14365
  * Copies the fields not handled by the `ɵɵInheritDefinitionFeature` from the supertype of a
@@ -14687,6 +15078,7 @@ export declare interface ɵɵInjectorDef<T> {
14687
15078
  imports: (InjectorType<any> | InjectorTypeWithProviders<any>)[];
14688
15079
  }
14689
15080
 
15081
+
14690
15082
  /** Flags describing an input for a directive. */
14691
15083
  export declare enum ɵɵInputFlags {
14692
15084
  None = 0,
@@ -15620,7 +16012,19 @@ export declare function ɵɵpureFunction8(slotOffset: number, pureFn: (v1: any,
15620
16012
  */
15621
16013
  export declare function ɵɵpureFunctionV(slotOffset: number, pureFn: (...v: any[]) => any, exps: any[], thisArg?: any): any;
15622
16014
 
15623
- export declare function ɵɵqueryAdvance(_count?: number): void;
16015
+ /**
16016
+ * Advances the current query index by a specified offset.
16017
+ *
16018
+ * Adjusting the current query index is necessary in cases where a given directive has a mix of
16019
+ * zone-based and signal-based queries. The signal-based queries don't require tracking of the
16020
+ * current index (those are refreshed on demand and not during change detection) so this instruction
16021
+ * is only necessary for backward-compatibility.
16022
+ *
16023
+ * @param index offset to apply to the current query index (defaults to 1)
16024
+ *
16025
+ * @codeGenApi
16026
+ */
16027
+ export declare function ɵɵqueryAdvance(indexOffset?: number): void;
15624
16028
 
15625
16029
  /**
15626
16030
  * Refreshes a query by combining matches from all active views and removing matches from deleted
@@ -16863,6 +17267,41 @@ export declare function ɵɵtrustConstantHtml(html: TemplateStringsArray): Trust
16863
17267
  */
16864
17268
  export declare function ɵɵtrustConstantResourceUrl(url: TemplateStringsArray): TrustedScriptURL | string;
16865
17269
 
17270
+ /**
17271
+ * Function used inside two-way listeners to conditionally set the value of the bound expression.
17272
+ *
17273
+ * @param target Field on which to set the value.
17274
+ * @param value Value to be set to the field.
17275
+ *
17276
+ * @codeGenApi
17277
+ */
17278
+ export declare function ɵɵtwoWayBindingSet<T>(target: unknown, value: T): boolean;
17279
+
17280
+ /**
17281
+ * Adds an event listener that updates a two-way binding to the current node.
17282
+ *
17283
+ * @param eventName Name of the event.
17284
+ * @param listenerFn The function to be called when event emits.
17285
+ *
17286
+ * @codeGenApi
17287
+ */
17288
+ export declare function ɵɵtwoWayListener(eventName: string, listenerFn: (e?: any) => any): typeof ɵɵtwoWayListener;
17289
+
17290
+ /**
17291
+ * Update a two-way bound property on a selected element.
17292
+ *
17293
+ * Operates on the element selected by index via the {@link select} instruction.
17294
+ *
17295
+ * @param propName Name of property.
17296
+ * @param value New value to write.
17297
+ * @param sanitizer An optional function used to sanitize the value.
17298
+ * @returns This function returns itself so that it may be chained
17299
+ * (e.g. `twoWayProperty('name', ctx.name)('title', ctx.title)`)
17300
+ *
17301
+ * @codeGenApi
17302
+ */
17303
+ export declare function ɵɵtwoWayProperty<T>(propName: string, value: T | WritableSignal<T>, sanitizer?: SanitizerFn | null): typeof ɵɵtwoWayProperty;
17304
+
16866
17305
 
16867
17306
  /**
16868
17307
  * Validation function invoked at runtime for each binding that might potentially
@@ -16876,7 +17315,7 @@ export declare function ɵɵtrustConstantResourceUrl(url: TemplateStringsArray):
16876
17315
  export declare function ɵɵvalidateIframeAttribute(attrValue: any, tagName: string, attrName: string): any;
16877
17316
 
16878
17317
  /**
16879
- * Creates new QueryList, stores the reference in LView and returns QueryList.
17318
+ * Creates a new view query by initializing internal data structures.
16880
17319
  *
16881
17320
  * @param predicate The type for which the query will search
16882
17321
  * @param flags Flags associated with the query
@@ -16886,6 +17325,17 @@ export declare function ɵɵvalidateIframeAttribute(attrValue: any, tagName: str
16886
17325
  */
16887
17326
  export declare function ɵɵviewQuery<T>(predicate: ProviderToken<unknown> | string | string[], flags: QueryFlags, read?: any): void;
16888
17327
 
16889
- export declare function ɵɵviewQuerySignal(): void;
17328
+ /**
17329
+ * Creates a new view query by initializing internal data structures and binding a new query to the
17330
+ * target signal.
17331
+ *
17332
+ * @param target The target signal to assign the query results to.
17333
+ * @param predicate The type or label that should match a given query
17334
+ * @param flags Flags associated with the query
17335
+ * @param read What to save in the query
17336
+ *
17337
+ * @codeGenApi
17338
+ */
17339
+ export declare function ɵɵviewQuerySignal(target: Signal<unknown>, predicate: ProviderToken<unknown> | string[], flags: QueryFlags, read?: ProviderToken<unknown>): void;
16890
17340
 
16891
17341
  export { }