Skip to content

Commit

Permalink
Fix wrong stores in types
Browse files Browse the repository at this point in the history
  • Loading branch information
luisherranz committed Jan 31, 2024
1 parent 79cf9df commit 2e24d23
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions packages/deepsignal/core/test/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,20 +124,20 @@ store5.c.b;
store5.c.$b;
// @ts-expect-error
store5.d;
store5.c = { b: 2 };

type Store6 = {
[key: string]: { b: number };
};

const store6 = deepSignal<Store5>({
const store6 = deepSignal<Store6>({
a: { b: 1 },
// @ts-expect-error
c: { b: "1" },
c: { b: 1 },
});

store5.a.b;
store5.a.$b;
store5.c.b;
store5.c.$b;
// @ts-expect-error
store5.d;
store6.a.b;
store6.a.$b;
store6.c.b;
store6.c.$b;
store6.d = { b: 2 };
store6.d.$b;

0 comments on commit 2e24d23

Please sign in to comment.