feat(commands): type command payload dispatch

This commit is contained in:
syntaxbullet
2026-07-03 09:50:39 +02:00
parent af71a49b09
commit d77bdc22a9
5 changed files with 24 additions and 5 deletions

View File

@@ -7,7 +7,7 @@ import { viewportPanCommand } from "./viewport";
describe("command dispatcher", () => {
test("throws for unknown commands", () => {
const store = createAppStore(createInitialAppState("Test"), createCommandRegistry([]));
expect(() => store.dispatch("missing", undefined)).toThrow("Unknown command: missing");
expect(() => store.dispatch("missing" as never, undefined as never)).toThrow("Unknown command: missing");
});
test("dispatch applies command result to store", () => {