Skip to content

Commit 69b384c

Browse files
devversionatscott
authored andcommitted
fix(core): SignalNode reactive node incorrectly exposing unset field (#53571)
The `SignalNode` interface, describing the reactive node for a `Signal`, seemingly exposes the `SIGNAL` symbol as a class member. This is not true as the `SIGNAL` reactive node only exists on the getter function, as a way to retrieve the signal underlying reactive node. This commit fixes this, enabling improved type-safety later, in a follow-up commit where `SIGNAL_NODE` can now be typed to match the `SignalNode` interface (unlike now where it's typed as just `object`). PR Close #53571
1 parent 3eaa006 commit 69b384c

File tree

2 files changed

+0
-3
lines changed
  • goldens/public-api/core/primitives/signals
  • packages/core/primitives/signals/src

2 files changed

+0
-3
lines changed

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,6 @@ export function signalMutateFn<T>(node: SignalNode<T>, mutator: (value: T) => vo
106106

107107
// @public (undocumented)
108108
export interface SignalNode<T> extends ReactiveNode {
109-
// (undocumented)
110-
readonly [SIGNAL]: SignalNode<T>;
111109
// (undocumented)
112110
equal: ValueEqualityFn<T>;
113111
// (undocumented)

packages/core/primitives/signals/src/signal.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ let postSignalSetFn: (() => void)|null = null;
2525
export interface SignalNode<T> extends ReactiveNode {
2626
value: T;
2727
equal: ValueEqualityFn<T>;
28-
readonly[SIGNAL]: SignalNode<T>;
2928
}
3029

3130
export type SignalBaseGetter<T> = (() => T)&{readonly[SIGNAL]: unknown};

0 commit comments

Comments
 (0)