diff --git a/packages/store/test/legacy-runtime-removal.test.ts b/packages/store/test/legacy-runtime-removal.test.ts index 80e9ebde..28b8cd6b 100644 --- a/packages/store/test/legacy-runtime-removal.test.ts +++ b/packages/store/test/legacy-runtime-removal.test.ts @@ -9,7 +9,11 @@ import { createStoreContainer, defineStore } from "../src/index.ts"; // action once `store-codegen.ts` stopped emitting it) and has been removed. // This test locks in the remaining `options.runtime` -> `"shared"` chain so a // future edit can't silently drop the `"shared"` fallback too. -const OnlySharedActionStore = defineStore({ +const OnlySharedActionStore = defineStore< + { count: number }, + Record, + { increment: (amount?: number) => void } +>({ name: "OnlySharedActionStore", kind: "global" as const, createSharedState: () => ({ count: 0 }), @@ -17,12 +21,14 @@ const OnlySharedActionStore = defineStore({ // No "client" or "server" definition exists for this action — only // "shared". A server-runtime container must still resolve it via the // "shared" fallback. - increment: { - runtime: "shared" as const, - handler: ({ state }: any, amount = 1) => { - state.count += amount; + increment: [ + { + runtime: "shared" as const, + handler: ({ state }: any, amount = 1) => { + state.count += amount; + }, }, - }, + ], }, });