From 8432b1143acc6a7bbb7d96bb21caacb4e2f96579 Mon Sep 17 00:00:00 2001 From: Pagan Gazzard Date: Mon, 27 Feb 2023 18:13:15 +0000 Subject: [PATCH] Fix async migrator typings when mixing migrator fns and sql Change-type: patch --- src/migrator/utils.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/migrator/utils.ts b/src/migrator/utils.ts index 149708e58..805ad4782 100644 --- a/src/migrator/utils.ts +++ b/src/migrator/utils.ts @@ -36,8 +36,7 @@ export type AsyncMigrationFn = ( ) => Resolvable; type AddFn = T & { - syncFn: MigrationFn; - asyncFn: AsyncMigrationFn; + [key in `${x}Fn`]: key extends 'syncFn' ? MigrationFn : AsyncMigrationFn; } & { [key in `${x}Sql`]?: undefined; };