From bc22461576b713c3bc0ba1abbde30c9e735c6a42 Mon Sep 17 00:00:00 2001 From: Huli <134658521+Huliiiiii@users.noreply.github.com> Date: Tue, 8 Oct 2024 10:48:40 +0800 Subject: [PATCH 1/2] continue --- packages/solid/src/reactive/signal.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/solid/src/reactive/signal.ts b/packages/solid/src/reactive/signal.ts index c119df12..ab86cf44 100644 --- a/packages/solid/src/reactive/signal.ts +++ b/packages/solid/src/reactive/signal.ts @@ -179,12 +179,12 @@ export function createRoot(fn: RootFunction, detachedOwner?: typeof Owner) export type Accessor = () => T; export type Setter = { - (value: Exclude | ((prev: T) => U)): U; ( ...args: undefined extends T ? [] : [value: Exclude | ((prev: T) => U)] ): undefined extends T ? undefined : U; (value: (prev: T) => U): U; (value: Exclude): U; + (value: Exclude | ((prev: T) => U)): U; }; export type Signal = [get: Accessor, set: Setter]; From 0c90aa7a0d3d79d368fcba4a4adfafa0bca608f4 Mon Sep 17 00:00:00 2001 From: Ryan Carniato Date: Tue, 8 Oct 2024 12:36:54 -0700 Subject: [PATCH 2/2] add changeset --- .changeset/empty-cars-jog.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/empty-cars-jog.md diff --git a/.changeset/empty-cars-jog.md b/.changeset/empty-cars-jog.md new file mode 100644 index 00000000..30753d6b --- /dev/null +++ b/.changeset/empty-cars-jog.md @@ -0,0 +1,5 @@ +--- +"solid-js": patch +--- + +Reordering setter overloads