Skip to content

Commit 2a767a3

Browse files
refactor(core): mark linkedSignal as developer preview (angular#58684)
This commit bumps up the stability status of the linkedSignal to developer preview - clearly expressing our highier confidence in this API. PR Close angular#58684
1 parent 2eb4afe commit 2a767a3

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

adev/src/content/guide/signals/linked-signal.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# `linkedSignal`
22

3-
IMPORTANT: `linkedSignal` is [experimental](reference/releases#experimental). It's ready for you to try, but it might change before it is stable.
3+
IMPORTANT: `linkedSignal` is [developer preview](reference/releases#developer-preview). It's ready for you to try, but it might change before it is stable.
44

55
You can use the `signal` function to hold some state in your Angular code. Sometimes, this state depends on some _other_ state. For example, imagine a component that lets the user select a shipping method for an order:
66

goldens/public-api/core/index.api.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1123,12 +1123,12 @@ export class KeyValueDiffers {
11231123
static ɵprov: unknown;
11241124
}
11251125

1126-
// @public (undocumented)
1126+
// @public
11271127
export function linkedSignal<D>(computation: () => D, options?: {
11281128
equal?: ValueEqualityFn<NoInfer<D>>;
11291129
}): WritableSignal<D>;
11301130

1131-
// @public (undocumented)
1131+
// @public
11321132
export function linkedSignal<S, D>(options: {
11331133
source: () => S;
11341134
computation: (source: NoInfer<S>, previous?: {

packages/core/src/render3/reactivity/linked_signal.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,21 @@ function createLinkedSignal<S, D>(node: LinkedSignalNode<S, D>): WritableSignal<
105105
}
106106

107107
/**
108-
* @experimental
108+
* Creates a writable signals whose value is initialized and reset by the linked, reactive computation.
109+
*
110+
* @developerPreview
109111
*/
110112
export function linkedSignal<D>(
111113
computation: () => D,
112114
options?: {equal?: ValueEqualityFn<NoInfer<D>>},
113115
): WritableSignal<D>;
116+
117+
/**
118+
* Creates a writable signals whose value is initialized and reset by the linked, reactive computation.
119+
* This is an advanced API form where the computation has access to the previous value of the signal and the computation result.
120+
*
121+
* @developerPreview
122+
*/
114123
export function linkedSignal<S, D>(options: {
115124
source: () => S;
116125
computation: (source: NoInfer<S>, previous?: {source: NoInfer<S>; value: NoInfer<D>}) => D;

0 commit comments

Comments
 (0)