@xynogen/pix-todo 0.1.8 → 0.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/todo.test.ts +5 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xynogen/pix-todo",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "description": "Pi tool — durable execution checklist (todo)",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
package/src/todo.test.ts CHANGED
@@ -504,6 +504,7 @@ describe("todo actions", () => {
504
504
  // ─── Persistence ────────────────────────────────────────────────────────────
505
505
 
506
506
  describe("persistence", () => {
507
+ type AppendCall = { type: string; data: unknown };
507
508
  test("set persists todos", async () => {
508
509
  const host = makeHost();
509
510
  registerTodo(host.pi);
@@ -515,8 +516,9 @@ describe("persistence", () => {
515
516
  host.appendCalls.length = 0;
516
517
  await run(host.execute, { action: "set", items: "alpha\nbravo" });
517
518
  expect(host.appendCalls.length).toBe(1);
518
- expect(host.appendCalls[0].type).toBe("todo-state");
519
- const data = host.appendCalls[0].data as {
519
+ const ac0 = host.appendCalls[0] as AppendCall;
520
+ expect(ac0.type).toBe("todo-state");
521
+ const data = ac0.data as {
520
522
  todos: Array<{ id: number; text: string; status: string }>;
521
523
  nextTodoId: number;
522
524
  };
@@ -564,7 +566,7 @@ describe("persistence", () => {
564
566
  host.appendCalls.length = 0;
565
567
  await run(host.execute, { action: "clear" });
566
568
  expect(host.appendCalls.length).toBe(1);
567
- const data = host.appendCalls[0].data as {
569
+ const data = (host.appendCalls[0] as AppendCall).data as {
568
570
  todos: Array<unknown>;
569
571
  nextTodoId: number;
570
572
  };