@angular/core 17.3.1 → 17.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/rxjs-interop/src/to_signal.mjs +2 -2
- 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/defer/instructions.mjs +21 -6
- package/esm2022/src/render3/component_ref.mjs +1 -1
- package/esm2022/src/render3/util/injector_discovery_utils.mjs +12 -8
- package/esm2022/src/version.mjs +1 -1
- package/esm2022/testing/src/fake_async.mjs +6 -1
- package/esm2022/testing/src/logger.mjs +3 -3
- package/esm2022/testing/src/test_hooks.mjs +3 -3
- package/esm2022/testing/src/testing.mjs +2 -2
- package/fesm2022/core.mjs +139 -47
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/primitives/signals.mjs +1 -1
- package/fesm2022/rxjs-interop.mjs +2 -2
- package/fesm2022/rxjs-interop.mjs.map +1 -1
- package/fesm2022/testing.mjs +7 -2
- package/fesm2022/testing.mjs.map +1 -1
- package/index.d.ts +158 -109
- package/package.json +1 -1
- package/primitives/signals/index.d.ts +1 -1
- package/rxjs-interop/index.d.ts +2 -2
- package/schematics/migrations/block-template-entities/bundle.js +163 -162
- package/schematics/migrations/block-template-entities/bundle.js.map +2 -2
- package/schematics/migrations/compiler-options/bundle.js +13 -13
- package/schematics/migrations/invalid-two-way-bindings/bundle.js +164 -163
- package/schematics/migrations/invalid-two-way-bindings/bundle.js.map +2 -2
- package/schematics/migrations/transfer-state/bundle.js +13 -13
- package/schematics/ng-generate/control-flow-migration/bundle.js +199 -183
- package/schematics/ng-generate/control-flow-migration/bundle.js.map +3 -3
- package/schematics/ng-generate/standalone-migration/bundle.js +3281 -1660
- package/schematics/ng-generate/standalone-migration/bundle.js.map +4 -4
- package/testing/index.d.ts +1 -1
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v17.3.
|
|
2
|
+
* @license Angular v17.3.3
|
|
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
|
/**
|
|
@@ -7647,25 +7672,47 @@ export declare interface Output {
|
|
|
7647
7672
|
export declare const Output: OutputDecorator;
|
|
7648
7673
|
|
|
7649
7674
|
/**
|
|
7650
|
-
* The `output` function allows declaration of outputs in
|
|
7651
|
-
* components.
|
|
7675
|
+
* The `output` function allows declaration of Angular outputs in
|
|
7676
|
+
* directives and components.
|
|
7677
|
+
*
|
|
7678
|
+
* You can use outputs to emit values to parent directives and component.
|
|
7679
|
+
* Parents can subscribe to changes via:
|
|
7652
7680
|
*
|
|
7653
|
-
*
|
|
7654
|
-
*
|
|
7681
|
+
* - template event bindings. For example, `(myOutput)="doSomething($event)"`
|
|
7682
|
+
* - programmatic subscription by using `OutputRef#subscribe`.
|
|
7655
7683
|
*
|
|
7656
7684
|
* @usageNotes
|
|
7657
|
-
*
|
|
7658
|
-
*
|
|
7685
|
+
*
|
|
7686
|
+
* To use `output()`, import the function from `@angular/core`.
|
|
7687
|
+
*
|
|
7688
|
+
* ```
|
|
7689
|
+
* import {output} from '@angular/core`;
|
|
7690
|
+
* ```
|
|
7691
|
+
*
|
|
7692
|
+
* Inside your component, introduce a new class member and initialize
|
|
7693
|
+
* it with a call to `output`.
|
|
7659
7694
|
*
|
|
7660
7695
|
* ```ts
|
|
7661
|
-
* @Directive({
|
|
7696
|
+
* @Directive({
|
|
7697
|
+
* ...
|
|
7698
|
+
* })
|
|
7662
7699
|
* export class MyDir {
|
|
7663
|
-
* nameChange = output<string>();
|
|
7664
|
-
* onClick
|
|
7700
|
+
* nameChange = output<string>(); // OutputEmitterRef<string>
|
|
7701
|
+
* onClick = output(); // OutputEmitterRef<void>
|
|
7702
|
+
* }
|
|
7703
|
+
* ```
|
|
7704
|
+
*
|
|
7705
|
+
* You can emit values to consumers of your directive, by using
|
|
7706
|
+
* the `emit` method from `OutputEmitterRef`.
|
|
7707
|
+
*
|
|
7708
|
+
* ```ts
|
|
7709
|
+
* updateName(newName: string): void {
|
|
7710
|
+
* this.nameChange.emit(newName);
|
|
7665
7711
|
* }
|
|
7666
7712
|
* ```
|
|
7667
7713
|
*
|
|
7668
7714
|
* @developerPreview
|
|
7715
|
+
* @initializerApiFunction {"showTypesInSignaturePreview": true}
|
|
7669
7716
|
*/
|
|
7670
7717
|
export declare function output<T = void>(opts?: OutputOptions): OutputEmitterRef<T>;
|
|
7671
7718
|
|
|
@@ -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
|
/**
|
|
@@ -13555,7 +13604,7 @@ export declare type ɵUnwrapDirectiveSignalInputs<Dir, Fields extends keyof Dir>
|
|
|
13555
13604
|
[P in Fields]: ɵUnwrapInputSignalWriteType<Dir[P]>;
|
|
13556
13605
|
};
|
|
13557
13606
|
|
|
13558
|
-
/** Retrieves the
|
|
13607
|
+
/** Retrieves the write type of an `InputSignal` and `InputSignalWithTransform`. */
|
|
13559
13608
|
declare type ɵUnwrapInputSignalWriteType<Field> = Field extends InputSignalWithTransform<any, infer WriteT> ? WriteT : never;
|
|
13560
13609
|
|
|
13561
13610
|
export declare function ɵunwrapSafeValue(value: ɵSafeValue): string;
|
package/package.json
CHANGED
package/rxjs-interop/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v17.3.
|
|
2
|
+
* @license Angular v17.3.3
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -140,7 +140,7 @@ export declare interface ToSignalOptions {
|
|
|
140
140
|
injector?: Injector;
|
|
141
141
|
/**
|
|
142
142
|
* Whether the subscription should be automatically cleaned up (via `DestroyRef`) when
|
|
143
|
-
* `
|
|
143
|
+
* `toSignal`'s creation context is destroyed.
|
|
144
144
|
*
|
|
145
145
|
* If manual cleanup is enabled, then `DestroyRef` is not used, and the subscription will persist
|
|
146
146
|
* until the `Observable` itself completes.
|