@angular/core 18.0.0-next.1 → 18.0.0-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/src/authoring/input/input.mjs +37 -14
- package/esm2022/src/authoring/input/input_signal.mjs +1 -1
- package/esm2022/src/authoring/input/input_signal_node.mjs +1 -1
- package/esm2022/src/authoring/input/input_type_checking.mjs +1 -1
- package/esm2022/src/authoring/model/model.mjs +35 -15
- package/esm2022/src/authoring/output/output.mjs +32 -10
- package/esm2022/src/authoring/queries.mjs +11 -1
- package/esm2022/src/change_detection/scheduling/ng_zone_scheduling.mjs +21 -4
- package/esm2022/src/change_detection/scheduling/zoneless_scheduling.mjs +5 -1
- package/esm2022/src/change_detection/scheduling/zoneless_scheduling_impl.mjs +88 -20
- package/esm2022/src/compiler/compiler_facade_interface.mjs +1 -1
- package/esm2022/src/core_private_export.mjs +2 -2
- package/esm2022/src/core_render3_private_export.mjs +2 -2
- package/esm2022/src/defer/instructions.mjs +23 -9
- package/esm2022/src/platform/platform_ref.mjs +3 -2
- package/esm2022/src/render3/component_ref.mjs +1 -1
- package/esm2022/src/render3/debug/framework_injector_profiler.mjs +2 -2
- package/esm2022/src/render3/instructions/control_flow.mjs +24 -15
- package/esm2022/src/render3/instructions/projection.mjs +35 -9
- package/esm2022/src/render3/instructions/template.mjs +45 -24
- package/esm2022/src/render3/jit/partial.mjs +13 -2
- package/esm2022/src/render3/util/injector_discovery_utils.mjs +2 -2
- package/esm2022/src/util/callback_scheduler.mjs +6 -1
- package/esm2022/src/version.mjs +1 -1
- package/esm2022/testing/src/component_fixture.mjs +23 -58
- package/esm2022/testing/src/logger.mjs +3 -3
- package/esm2022/testing/src/test_bed.mjs +4 -4
- package/fesm2022/core.mjs +388 -148
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/primitives/signals.mjs +1 -1
- package/fesm2022/rxjs-interop.mjs +1 -1
- package/fesm2022/testing.mjs +25 -60
- package/fesm2022/testing.mjs.map +1 -1
- package/index.d.ts +190 -117
- package/package.json +1 -1
- package/primitives/signals/index.d.ts +1 -1
- package/rxjs-interop/index.d.ts +1 -1
- package/schematics/migrations/block-template-entities/bundle.js +157 -99
- package/schematics/migrations/block-template-entities/bundle.js.map +3 -3
- package/schematics/migrations/invalid-two-way-bindings/bundle.js +159 -100
- package/schematics/migrations/invalid-two-way-bindings/bundle.js.map +3 -3
- package/schematics/ng-generate/control-flow-migration/bundle.js +161 -100
- package/schematics/ng-generate/control-flow-migration/bundle.js.map +3 -3
- package/schematics/ng-generate/standalone-migration/bundle.js +1380 -882
- package/schematics/ng-generate/standalone-migration/bundle.js.map +4 -4
- package/testing/index.d.ts +4 -3
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v18.0.0-next.
|
|
2
|
+
* @license Angular v18.0.0-next.2
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -1900,6 +1900,9 @@ export declare const ContentChild: ContentChildDecorator;
|
|
|
1900
1900
|
* headerRequired = contentChild.required(MyHeader); // Signal<MyHeader>
|
|
1901
1901
|
* }
|
|
1902
1902
|
* ```
|
|
1903
|
+
*
|
|
1904
|
+
* @initializerApiFunction
|
|
1905
|
+
* @developerPreview
|
|
1903
1906
|
*/
|
|
1904
1907
|
export declare const contentChild: ContentChildFunction;
|
|
1905
1908
|
|
|
@@ -1987,6 +1990,7 @@ export declare interface ContentChildDecorator {
|
|
|
1987
1990
|
* provides access to required query results via the `.required` property.
|
|
1988
1991
|
*
|
|
1989
1992
|
* @developerPreview
|
|
1993
|
+
* @docsPrivate Ignored because `contentChild` is the canonical API entry.
|
|
1990
1994
|
*/
|
|
1991
1995
|
export declare interface ContentChildFunction {
|
|
1992
1996
|
/**
|
|
@@ -2005,8 +2009,6 @@ export declare interface ContentChildFunction {
|
|
|
2005
2009
|
}): Signal<ReadT | undefined>;
|
|
2006
2010
|
/**
|
|
2007
2011
|
* Initializes a content child query that is always expected to match.
|
|
2008
|
-
*
|
|
2009
|
-
* @developerPreview
|
|
2010
2012
|
*/
|
|
2011
2013
|
required: {
|
|
2012
2014
|
<LocatorT>(locator: ProviderToken<LocatorT> | string, opts?: {
|
|
@@ -5575,29 +5577,52 @@ export declare interface Input {
|
|
|
5575
5577
|
export declare const Input: InputDecorator;
|
|
5576
5578
|
|
|
5577
5579
|
/**
|
|
5578
|
-
* The `input` function allows declaration of inputs in directives
|
|
5579
|
-
* components.
|
|
5580
|
+
* The `input` function allows declaration of Angular inputs in directives
|
|
5581
|
+
* and components.
|
|
5580
5582
|
*
|
|
5581
|
-
*
|
|
5582
|
-
* is specified, Angular will use `undefined`.
|
|
5583
|
+
* There are two variants of inputs that can be declared:
|
|
5583
5584
|
*
|
|
5584
|
-
*
|
|
5585
|
-
*
|
|
5585
|
+
* 1. **Optional inputs** with an initial value.
|
|
5586
|
+
* 2. **Required inputs** that consumers need to set.
|
|
5587
|
+
*
|
|
5588
|
+
* By default, the `input` function will declare optional inputs that
|
|
5589
|
+
* always have an initial value. Required inputs can be declared
|
|
5590
|
+
* using the `input.required()` function.
|
|
5591
|
+
*
|
|
5592
|
+
* Inputs are signals. The values of an input are exposed as a `Signal`.
|
|
5593
|
+
* The signal always holds the latest value of the input that is bound
|
|
5594
|
+
* from the parent.
|
|
5586
5595
|
*
|
|
5587
5596
|
* @usageNotes
|
|
5588
|
-
*
|
|
5589
|
-
*
|
|
5597
|
+
* To use signal-based inputs, import `input` from `@angular/core`.
|
|
5598
|
+
*
|
|
5599
|
+
* ```
|
|
5600
|
+
* import {input} from '@angular/core`;
|
|
5601
|
+
* ```
|
|
5602
|
+
*
|
|
5603
|
+
* Inside your component, introduce a new class member and initialize
|
|
5604
|
+
* it with a call to `input` or `input.required`.
|
|
5590
5605
|
*
|
|
5591
5606
|
* ```ts
|
|
5592
|
-
* @
|
|
5593
|
-
*
|
|
5594
|
-
*
|
|
5595
|
-
*
|
|
5596
|
-
*
|
|
5607
|
+
* @Component({
|
|
5608
|
+
* ...
|
|
5609
|
+
* })
|
|
5610
|
+
* export class UserProfileComponent {
|
|
5611
|
+
* firstName = input<string>(); // Signal<string|undefined>
|
|
5612
|
+
* lastName = input.required<string>(); // Signal<string>
|
|
5613
|
+
* age = input(0) // Signal<number>
|
|
5597
5614
|
* }
|
|
5598
5615
|
* ```
|
|
5599
5616
|
*
|
|
5617
|
+
* Inside your component template, you can display values of the inputs
|
|
5618
|
+
* by calling the signal.
|
|
5619
|
+
*
|
|
5620
|
+
* ```html
|
|
5621
|
+
* <span>{{firstName()}}</span>
|
|
5622
|
+
* ```
|
|
5623
|
+
*
|
|
5600
5624
|
* @developerPreview
|
|
5625
|
+
* @initializerApiFunction
|
|
5601
5626
|
*/
|
|
5602
5627
|
export declare const input: InputFunction;
|
|
5603
5628
|
|
|
@@ -5667,46 +5692,43 @@ export declare interface InputDecorator {
|
|
|
5667
5692
|
* The function exposes an API for also declaring required inputs via the
|
|
5668
5693
|
* `input.required` function.
|
|
5669
5694
|
*
|
|
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
5695
|
* @developerPreview
|
|
5696
|
+
* @docsPrivate Ignored because `input` is the canonical API entry.
|
|
5685
5697
|
*/
|
|
5686
5698
|
export declare interface InputFunction {
|
|
5687
5699
|
/**
|
|
5688
|
-
* Initializes an input with an initial value
|
|
5689
|
-
*
|
|
5690
|
-
|
|
5691
|
-
|
|
5692
|
-
|
|
5700
|
+
* Initializes an input of type `T` with an initial value of `undefined`.
|
|
5701
|
+
* Angular will implicitly use `undefined` as initial value.
|
|
5702
|
+
*/
|
|
5703
|
+
<T>(): InputSignal<T | undefined>;
|
|
5704
|
+
/** Declares an input of type `T` with an explicit initial value. */
|
|
5705
|
+
<T>(initialValue: T, opts?: InputOptionsWithoutTransform<T>): InputSignal<T>;
|
|
5706
|
+
/**
|
|
5707
|
+
* Declares an input of type `T` with an initial value and a transform
|
|
5708
|
+
* function.
|
|
5693
5709
|
*
|
|
5694
|
-
*
|
|
5710
|
+
* The input accepts values of type `TransformT` and the given
|
|
5711
|
+
* transform function will transform the value to type `T`.
|
|
5695
5712
|
*/
|
|
5696
|
-
<
|
|
5697
|
-
<ReadT>(initialValue: ReadT, opts?: InputOptionsWithoutTransform<ReadT>): InputSignal<ReadT>;
|
|
5698
|
-
<ReadT, WriteT>(initialValue: ReadT, opts: InputOptionsWithTransform<ReadT, WriteT>): InputSignalWithTransform<ReadT, WriteT>;
|
|
5713
|
+
<T, TransformT>(initialValue: T, opts: InputOptionsWithTransform<T, TransformT>): InputSignalWithTransform<T, TransformT>;
|
|
5699
5714
|
/**
|
|
5700
5715
|
* Initializes a required input.
|
|
5701
5716
|
*
|
|
5702
|
-
*
|
|
5717
|
+
* Consumers of your directive/component need to bind to this
|
|
5703
5718
|
* input. If unset, a compile time error will be reported.
|
|
5704
5719
|
*
|
|
5705
5720
|
* @developerPreview
|
|
5706
5721
|
*/
|
|
5707
5722
|
required: {
|
|
5708
|
-
|
|
5709
|
-
<
|
|
5723
|
+
/** Declares a required input of type `T`. */
|
|
5724
|
+
<T>(opts?: InputOptionsWithoutTransform<T>): InputSignal<T>;
|
|
5725
|
+
/**
|
|
5726
|
+
* Declares a required input of type `T` with a transform function.
|
|
5727
|
+
*
|
|
5728
|
+
* The input accepts values of type `TransformT` and the given
|
|
5729
|
+
* transform function will transform the value to type `T`.
|
|
5730
|
+
*/
|
|
5731
|
+
<T, TransformT>(opts: InputOptionsWithTransform<T, TransformT>): InputSignalWithTransform<T, TransformT>;
|
|
5710
5732
|
};
|
|
5711
5733
|
}
|
|
5712
5734
|
|
|
@@ -5715,7 +5737,7 @@ export declare interface InputFunction {
|
|
|
5715
5737
|
*
|
|
5716
5738
|
* Options for signal inputs.
|
|
5717
5739
|
*/
|
|
5718
|
-
export declare interface InputOptions<
|
|
5740
|
+
export declare interface InputOptions<T, TransformT> {
|
|
5719
5741
|
/** Optional public name for the input. By default, the class field name is used. */
|
|
5720
5742
|
alias?: string;
|
|
5721
5743
|
/**
|
|
@@ -5728,7 +5750,7 @@ export declare interface InputOptions<ReadT, WriteT> {
|
|
|
5728
5750
|
* attribute form to bind to the input via `<my-dir input>`. A transform can then
|
|
5729
5751
|
* handle such string values and convert them to `boolean`. See: {@link booleanAttribute}.
|
|
5730
5752
|
*/
|
|
5731
|
-
transform?: (v:
|
|
5753
|
+
transform?: (v: TransformT) => T;
|
|
5732
5754
|
}
|
|
5733
5755
|
|
|
5734
5756
|
/**
|
|
@@ -5736,7 +5758,7 @@ export declare interface InputOptions<ReadT, WriteT> {
|
|
|
5736
5758
|
*
|
|
5737
5759
|
* @developerPreview
|
|
5738
5760
|
*/
|
|
5739
|
-
export declare type InputOptionsWithoutTransform<
|
|
5761
|
+
export declare type InputOptionsWithoutTransform<T> = Omit<InputOptions<T, T>, 'transform'> & {
|
|
5740
5762
|
transform?: undefined;
|
|
5741
5763
|
};
|
|
5742
5764
|
|
|
@@ -5745,7 +5767,7 @@ export declare type InputOptionsWithoutTransform<ReadT> = Omit<InputOptions<Read
|
|
|
5745
5767
|
*
|
|
5746
5768
|
* @developerPreview
|
|
5747
5769
|
*/
|
|
5748
|
-
export declare type InputOptionsWithTransform<
|
|
5770
|
+
export declare type InputOptionsWithTransform<T, TransformT> = Required<Pick<InputOptions<T, TransformT>, 'transform'>> & InputOptions<T, TransformT>;
|
|
5749
5771
|
|
|
5750
5772
|
/**
|
|
5751
5773
|
* `InputSignal` represents a special `Signal` for a directive/component input.
|
|
@@ -5758,28 +5780,28 @@ export declare type InputOptionsWithTransform<ReadT, WriteT> = Required<Pick<Inp
|
|
|
5758
5780
|
*
|
|
5759
5781
|
* @developerPreview
|
|
5760
5782
|
*/
|
|
5761
|
-
export declare interface InputSignal<
|
|
5783
|
+
export declare interface InputSignal<T> extends InputSignalWithTransform<T, T> {
|
|
5762
5784
|
}
|
|
5763
5785
|
|
|
5764
5786
|
/**
|
|
5765
5787
|
* Reactive node type for an input signal. An input signal extends a signal.
|
|
5766
5788
|
* There are special properties to enable transforms and required inputs.
|
|
5767
5789
|
*/
|
|
5768
|
-
declare interface InputSignalNode<
|
|
5790
|
+
declare interface InputSignalNode<T, TransformT> extends SignalNode<T> {
|
|
5769
5791
|
/**
|
|
5770
5792
|
* User-configured transform that will run whenever a new value is applied
|
|
5771
5793
|
* to the input signal node.
|
|
5772
5794
|
*/
|
|
5773
|
-
transformFn: ((value:
|
|
5795
|
+
transformFn: ((value: TransformT) => T) | undefined;
|
|
5774
5796
|
/**
|
|
5775
5797
|
* Applies a new value to the input signal. Expects transforms to be run
|
|
5776
5798
|
* manually before.
|
|
5777
5799
|
*
|
|
5778
5800
|
* This function is called by the framework runtime code whenever a binding
|
|
5779
5801
|
* changes. The value can in practice be anything at runtime, but for typing
|
|
5780
|
-
* purposes we assume it's a valid `
|
|
5802
|
+
* purposes we assume it's a valid `T` value. Type-checking will enforce that.
|
|
5781
5803
|
*/
|
|
5782
|
-
applyValueToInputSignal<
|
|
5804
|
+
applyValueToInputSignal<T, TransformT>(node: InputSignalNode<T, TransformT>, value: T): void;
|
|
5783
5805
|
}
|
|
5784
5806
|
|
|
5785
5807
|
/**
|
|
@@ -5806,10 +5828,10 @@ declare interface InputSignalNode<ReadT, WriteT> extends SignalNode<ReadT> {
|
|
|
5806
5828
|
*
|
|
5807
5829
|
* @developerPreview
|
|
5808
5830
|
*/
|
|
5809
|
-
export declare interface InputSignalWithTransform<
|
|
5810
|
-
[SIGNAL]: InputSignalNode<
|
|
5811
|
-
[ɵINPUT_SIGNAL_BRAND_READ_TYPE]:
|
|
5812
|
-
[ɵINPUT_SIGNAL_BRAND_WRITE_TYPE]:
|
|
5831
|
+
export declare interface InputSignalWithTransform<T, TransformT> extends Signal<T> {
|
|
5832
|
+
[SIGNAL]: InputSignalNode<T, TransformT>;
|
|
5833
|
+
[ɵINPUT_SIGNAL_BRAND_READ_TYPE]: T;
|
|
5834
|
+
[ɵINPUT_SIGNAL_BRAND_WRITE_TYPE]: TransformT;
|
|
5813
5835
|
}
|
|
5814
5836
|
|
|
5815
5837
|
/** Function that can be used to transform incoming input values. */
|
|
@@ -6776,31 +6798,51 @@ export declare enum MissingTranslationStrategy {
|
|
|
6776
6798
|
}
|
|
6777
6799
|
|
|
6778
6800
|
/**
|
|
6779
|
-
* `model` declares a writeable signal that is exposed as an input/output
|
|
6780
|
-
*
|
|
6801
|
+
* `model` declares a writeable signal that is exposed as an input/output
|
|
6802
|
+
* pair on the containing directive.
|
|
6803
|
+
*
|
|
6804
|
+
* The input name is taken either from the class member or from the `alias` option.
|
|
6781
6805
|
* The output name is generated by taking the input name and appending `Change`.
|
|
6782
6806
|
*
|
|
6783
|
-
*
|
|
6784
|
-
* is specified, Angular will use `undefined`.
|
|
6807
|
+
* @usageNotes
|
|
6785
6808
|
*
|
|
6786
|
-
*
|
|
6787
|
-
* initial value.
|
|
6809
|
+
* To use `model()`, import the function from `@angular/core`.
|
|
6788
6810
|
*
|
|
6789
|
-
*
|
|
6790
|
-
*
|
|
6791
|
-
*
|
|
6792
|
-
*
|
|
6811
|
+
* ```
|
|
6812
|
+
* import {model} from '@angular/core`;
|
|
6813
|
+
* ```
|
|
6814
|
+
*
|
|
6815
|
+
* Inside your component, introduce a new class member and initialize
|
|
6816
|
+
* it with a call to `model` or `model.required`.
|
|
6793
6817
|
*
|
|
6794
6818
|
* ```ts
|
|
6795
|
-
* @Directive({
|
|
6819
|
+
* @Directive({
|
|
6820
|
+
* ...
|
|
6821
|
+
* })
|
|
6796
6822
|
* export class MyDir {
|
|
6797
|
-
* firstName = model<string>(); // string|undefined
|
|
6798
|
-
* lastName
|
|
6799
|
-
* age
|
|
6823
|
+
* firstName = model<string>(); // ModelSignal<string|undefined>
|
|
6824
|
+
* lastName = model.required<string>(); // ModelSignal<string>
|
|
6825
|
+
* age = model(0); // ModelSignal<number>
|
|
6826
|
+
* }
|
|
6827
|
+
* ```
|
|
6828
|
+
*
|
|
6829
|
+
* Inside your component template, you can display the value of a `model`
|
|
6830
|
+
* by calling the signal.
|
|
6831
|
+
*
|
|
6832
|
+
* ```html
|
|
6833
|
+
* <span>{{firstName()}}</span>
|
|
6834
|
+
* ```
|
|
6835
|
+
*
|
|
6836
|
+
* Updating the `model` is equivalent to updating a writable signal.
|
|
6837
|
+
*
|
|
6838
|
+
* ```ts
|
|
6839
|
+
* updateName(newFirstName: string): void {
|
|
6840
|
+
* this.firstName.set(newFirstName);
|
|
6800
6841
|
* }
|
|
6801
6842
|
* ```
|
|
6802
6843
|
*
|
|
6803
6844
|
* @developerPreview
|
|
6845
|
+
* @initializerApiFunction
|
|
6804
6846
|
*/
|
|
6805
6847
|
export declare const model: ModelFunction;
|
|
6806
6848
|
|
|
@@ -6812,43 +6854,26 @@ export declare const model: ModelFunction;
|
|
|
6812
6854
|
* The function exposes an API for also declaring required models via the
|
|
6813
6855
|
* `model.required` function.
|
|
6814
6856
|
*
|
|
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
6857
|
* @developerPreview
|
|
6858
|
+
* @docsPrivate Ignored because `model` is the canonical API entry.
|
|
6830
6859
|
*/
|
|
6831
6860
|
export declare interface ModelFunction {
|
|
6832
6861
|
/**
|
|
6833
|
-
* Initializes a model with an initial value
|
|
6834
|
-
*
|
|
6835
|
-
*
|
|
6836
|
-
* Consider using `model.required` for models that don't need an
|
|
6837
|
-
* initial value.
|
|
6838
|
-
*
|
|
6839
|
-
* @developerPreview
|
|
6862
|
+
* Initializes a model of type `T` with an initial value of `undefined`.
|
|
6863
|
+
* Angular will implicitly use `undefined` as initial value.
|
|
6840
6864
|
*/
|
|
6841
6865
|
<T>(): ModelSignal<T | undefined>;
|
|
6866
|
+
/** Initializes a model of type `T` with the given initial value. */
|
|
6842
6867
|
<T>(initialValue: T, opts?: ModelOptions): ModelSignal<T>;
|
|
6843
|
-
|
|
6844
|
-
|
|
6845
|
-
|
|
6846
|
-
|
|
6847
|
-
|
|
6848
|
-
|
|
6849
|
-
|
|
6850
|
-
|
|
6851
|
-
|
|
6868
|
+
required: {
|
|
6869
|
+
/**
|
|
6870
|
+
* Initializes a required model.
|
|
6871
|
+
*
|
|
6872
|
+
* Users of your directive/component need to bind to the input side of the model.
|
|
6873
|
+
* If unset, a compile time error will be reported.
|
|
6874
|
+
*/
|
|
6875
|
+
<T>(opts?: ModelOptions): ModelSignal<T>;
|
|
6876
|
+
};
|
|
6852
6877
|
}
|
|
6853
6878
|
|
|
6854
6879
|
/**
|
|
@@ -7476,7 +7501,6 @@ declare type NodeOutputBindings = Record<string, (number | string)[]>;
|
|
|
7476
7501
|
|
|
7477
7502
|
declare const NODES = "n";
|
|
7478
7503
|
|
|
7479
|
-
|
|
7480
7504
|
declare const enum NotificationType {
|
|
7481
7505
|
RefreshViews = 0,
|
|
7482
7506
|
AfterRenderHooks = 1
|
|
@@ -7647,25 +7671,47 @@ export declare interface Output {
|
|
|
7647
7671
|
export declare const Output: OutputDecorator;
|
|
7648
7672
|
|
|
7649
7673
|
/**
|
|
7650
|
-
* The `output` function allows declaration of outputs in
|
|
7651
|
-
* components.
|
|
7674
|
+
* The `output` function allows declaration of Angular outputs in
|
|
7675
|
+
* directives and components.
|
|
7652
7676
|
*
|
|
7653
|
-
*
|
|
7654
|
-
*
|
|
7677
|
+
* You can use outputs to emit values to parent directives and component.
|
|
7678
|
+
* Parents can subscribe to changes via:
|
|
7679
|
+
*
|
|
7680
|
+
* - template event bindings. For example, `(myOutput)="doSomething($event)"`
|
|
7681
|
+
* - programmatic subscription by using `OutputRef#subscribe`.
|
|
7655
7682
|
*
|
|
7656
7683
|
* @usageNotes
|
|
7657
|
-
*
|
|
7658
|
-
*
|
|
7684
|
+
*
|
|
7685
|
+
* To use `output()`, import the function from `@angular/core`.
|
|
7686
|
+
*
|
|
7687
|
+
* ```
|
|
7688
|
+
* import {output} from '@angular/core`;
|
|
7689
|
+
* ```
|
|
7690
|
+
*
|
|
7691
|
+
* Inside your component, introduce a new class member and initialize
|
|
7692
|
+
* it with a call to `output`.
|
|
7659
7693
|
*
|
|
7660
7694
|
* ```ts
|
|
7661
|
-
* @Directive({
|
|
7695
|
+
* @Directive({
|
|
7696
|
+
* ...
|
|
7697
|
+
* })
|
|
7662
7698
|
* export class MyDir {
|
|
7663
|
-
* nameChange = output<string>();
|
|
7664
|
-
* onClick
|
|
7699
|
+
* nameChange = output<string>(); // OutputEmitterRef<string>
|
|
7700
|
+
* onClick = output(); // OutputEmitterRef<void>
|
|
7701
|
+
* }
|
|
7702
|
+
* ```
|
|
7703
|
+
*
|
|
7704
|
+
* You can emit values to consumers of your directive, by using
|
|
7705
|
+
* the `emit` method from `OutputEmitterRef`.
|
|
7706
|
+
*
|
|
7707
|
+
* ```ts
|
|
7708
|
+
* updateName(newName: string): void {
|
|
7709
|
+
* this.nameChange.emit(newName);
|
|
7665
7710
|
* }
|
|
7666
7711
|
* ```
|
|
7667
7712
|
*
|
|
7668
7713
|
* @developerPreview
|
|
7714
|
+
* @initializerApiFunction {"showTypesInSignaturePreview": true}
|
|
7669
7715
|
*/
|
|
7670
7716
|
export declare function output<T = void>(opts?: OutputOptions): OutputEmitterRef<T>;
|
|
7671
7717
|
|
|
@@ -8258,6 +8304,7 @@ declare interface R3DeclareComponentFacade extends R3DeclareDirectiveFacade {
|
|
|
8258
8304
|
pipes?: {
|
|
8259
8305
|
[pipeName: string]: OpaqueValue | (() => OpaqueValue);
|
|
8260
8306
|
};
|
|
8307
|
+
deferBlockDependencies?: (() => Promise<Type_2> | null)[];
|
|
8261
8308
|
viewProviders?: OpaqueValue;
|
|
8262
8309
|
animations?: OpaqueValue;
|
|
8263
8310
|
changeDetection?: ChangeDetectionStrategy_2;
|
|
@@ -11103,6 +11150,7 @@ export declare const ViewChild: ViewChildDecorator;
|
|
|
11103
11150
|
* ```
|
|
11104
11151
|
*
|
|
11105
11152
|
* @developerPreview
|
|
11153
|
+
* @initializerApiFunction
|
|
11106
11154
|
*/
|
|
11107
11155
|
export declare const viewChild: ViewChildFunction;
|
|
11108
11156
|
|
|
@@ -11184,6 +11232,7 @@ export declare interface ViewChildDecorator {
|
|
|
11184
11232
|
* property.
|
|
11185
11233
|
*
|
|
11186
11234
|
* @developerPreview
|
|
11235
|
+
* @docsPrivate Ignored because `viewChild` is the canonical API entry.
|
|
11187
11236
|
*/
|
|
11188
11237
|
export declare interface ViewChildFunction {
|
|
11189
11238
|
/**
|
|
@@ -11863,6 +11912,7 @@ export declare const enum ɵBypassType {
|
|
|
11863
11912
|
*/
|
|
11864
11913
|
export declare abstract class ɵChangeDetectionScheduler {
|
|
11865
11914
|
abstract notify(source?: NotificationType): void;
|
|
11915
|
+
abstract tick(shouldRefreshViews: boolean): void;
|
|
11866
11916
|
}
|
|
11867
11917
|
|
|
11868
11918
|
export declare function ɵclearResolutionOfComponentResourcesQueue(): Map<Type<any>, Component>;
|
|
@@ -13555,7 +13605,7 @@ export declare type ɵUnwrapDirectiveSignalInputs<Dir, Fields extends keyof Dir>
|
|
|
13555
13605
|
[P in Fields]: ɵUnwrapInputSignalWriteType<Dir[P]>;
|
|
13556
13606
|
};
|
|
13557
13607
|
|
|
13558
|
-
/** Retrieves the
|
|
13608
|
+
/** Retrieves the write type of an `InputSignal` and `InputSignalWithTransform`. */
|
|
13559
13609
|
declare type ɵUnwrapInputSignalWriteType<Field> = Field extends InputSignalWithTransform<any, infer WriteT> ? WriteT : never;
|
|
13560
13610
|
|
|
13561
13611
|
export declare function ɵunwrapSafeValue(value: ɵSafeValue): string;
|
|
@@ -13859,6 +13909,9 @@ declare const ɵWRITABLE_SIGNAL: unique symbol;
|
|
|
13859
13909
|
*/
|
|
13860
13910
|
export declare const ɵXSS_SECURITY_URL = "https://g.co/ng/security#xss";
|
|
13861
13911
|
|
|
13912
|
+
/** Token used to indicate if zoneless was enabled via provideZonelessChangeDetection(). */
|
|
13913
|
+
export declare const ɵZONELESS_ENABLED: InjectionToken<boolean>;
|
|
13914
|
+
|
|
13862
13915
|
/**
|
|
13863
13916
|
* Advances to an element for later binding instructions.
|
|
13864
13917
|
*
|
|
@@ -14534,8 +14587,6 @@ export declare function ɵɵcomponentInstance(): unknown;
|
|
|
14534
14587
|
* built-in "if" and "switch". On the high level this instruction is responsible for adding and
|
|
14535
14588
|
* removing views selected by a conditional expression.
|
|
14536
14589
|
*
|
|
14537
|
-
* @param containerIndex index of a container in a host view (indexed from HEADER_OFFSET) where
|
|
14538
|
-
* conditional views should be inserted.
|
|
14539
14590
|
* @param matchingTemplateIndex index of a template TNode representing a conditional view to be
|
|
14540
14591
|
* inserted; -1 represents a special case when there is no view to insert.
|
|
14541
14592
|
* @codeGenApi
|
|
@@ -15409,6 +15460,23 @@ export declare function ɵɵngDeclareClassMetadata(decl: {
|
|
|
15409
15460
|
};
|
|
15410
15461
|
}): void;
|
|
15411
15462
|
|
|
15463
|
+
/**
|
|
15464
|
+
* Evaluates the class metadata of a component that contains deferred blocks.
|
|
15465
|
+
*
|
|
15466
|
+
* @codeGenApi
|
|
15467
|
+
*/
|
|
15468
|
+
export declare function ɵɵngDeclareClassMetadataAsync(decl: {
|
|
15469
|
+
type: Type<any>;
|
|
15470
|
+
resolveDeferredDeps: () => Promise<Type<unknown>>[];
|
|
15471
|
+
resolveMetadata: (...types: Type<unknown>[]) => {
|
|
15472
|
+
decorators: any[];
|
|
15473
|
+
ctorParameters: (() => any[]) | null;
|
|
15474
|
+
propDecorators: ({
|
|
15475
|
+
[field: string]: any;
|
|
15476
|
+
}) | null;
|
|
15477
|
+
};
|
|
15478
|
+
}): void;
|
|
15479
|
+
|
|
15412
15480
|
/**
|
|
15413
15481
|
* Compiles a partial component declaration object into a full component definition object.
|
|
15414
15482
|
*
|
|
@@ -15584,14 +15652,19 @@ export declare type ɵɵPipeDeclaration<T, Name extends string, IsStandalone ext
|
|
|
15584
15652
|
* Inserts previously re-distributed projected nodes. This instruction must be preceded by a call
|
|
15585
15653
|
* to the projectionDef instruction.
|
|
15586
15654
|
*
|
|
15587
|
-
* @param nodeIndex
|
|
15588
|
-
* @param selectorIndex
|
|
15589
|
-
*
|
|
15590
|
-
*
|
|
15655
|
+
* @param nodeIndex Index of the projection node.
|
|
15656
|
+
* @param selectorIndex Index of the slot selector.
|
|
15657
|
+
* - 0 when the selector is `*` (or unspecified as this is the default value),
|
|
15658
|
+
* - 1 based index of the selector from the {@link projectionDef}
|
|
15659
|
+
* @param attrs Static attributes set on the `ng-content` node.
|
|
15660
|
+
* @param fallbackTemplateFn Template function with fallback content.
|
|
15661
|
+
* Will be rendered if the slot is empty at runtime.
|
|
15662
|
+
* @param fallbackDecls Number of declarations in the fallback template.
|
|
15663
|
+
* @param fallbackVars Number of variables in the fallback template.
|
|
15591
15664
|
*
|
|
15592
15665
|
* @codeGenApi
|
|
15593
15666
|
*/
|
|
15594
|
-
export declare function ɵɵprojection(nodeIndex: number, selectorIndex?: number, attrs?: TAttributes): void;
|
|
15667
|
+
export declare function ɵɵprojection(nodeIndex: number, selectorIndex?: number, attrs?: TAttributes, fallbackTemplateFn?: ComponentTemplate<unknown>, fallbackDecls?: number, fallbackVars?: number): void;
|
|
15595
15668
|
|
|
15596
15669
|
/**
|
|
15597
15670
|
* Instruction to distribute projectable nodes among <ng-content> occurrences in a given template.
|
package/package.json
CHANGED
package/rxjs-interop/index.d.ts
CHANGED