Skip to content

Commit bb6ce8b

Browse files
Huliiiiiiryansolid
andauthored
Reordering setter overloads (#2333)
* continue * add changeset --------- Co-authored-by: Ryan Carniato <[email protected]>
1 parent 5c52b56 commit bb6ce8b

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/empty-cars-jog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"solid-js": patch
3+
---
4+
5+
Reordering setter overloads

packages/solid/src/reactive/signal.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,12 +179,12 @@ export function createRoot<T>(fn: RootFunction<T>, detachedOwner?: typeof Owner)
179179
export type Accessor<T> = () => T;
180180

181181
export type Setter<in out T> = {
182-
<U extends T>(value: Exclude<U, Function> | ((prev: T) => U)): U;
183182
<U extends T>(
184183
...args: undefined extends T ? [] : [value: Exclude<U, Function> | ((prev: T) => U)]
185184
): undefined extends T ? undefined : U;
186185
<U extends T>(value: (prev: T) => U): U;
187186
<U extends T>(value: Exclude<U, Function>): U;
187+
<U extends T>(value: Exclude<U, Function> | ((prev: T) => U)): U;
188188
};
189189

190190
export type Signal<T> = [get: Accessor<T>, set: Setter<T>];

0 commit comments

Comments
 (0)