Skip to content

Commit 1c2113b

Browse files
danrocccharly
andauthored
chore: update type test
Co-authored-by: Charly Chevalier <charly.chevalier@consensys.net>
1 parent 08ccf0d commit 1c2113b

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

packages/keyring-sdk/src/migration.test-d.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@ createMigrations()
2121
// A step's `migrate` must accept the previous step's output shape.
2222
createMigrations()
2323
.add({ migrate: (): { count: number } => ({ count: 1 }) })
24-
// @ts-expect-error [test] `data` is `{ count: number }`, not `{ label: string }`.
25-
.add({ migrate: (data: { label: string }) => data.label });
24+
.add({ migrate: (data) => {
25+
expectType<{ count: number }>(data);
26+
return data;
27+
}});
2628

2729
// `inputSchema` narrows `migrate`'s input to the schema's inferred type, with no cast
2830
// needed.

0 commit comments

Comments
 (0)