From 07553befc1b095149adf1f9371a185b4602e03d7 Mon Sep 17 00:00:00 2001 From: Keith Smith Date: Thu, 12 Sep 2019 12:36:35 -0600 Subject: [PATCH 1/2] Fixes types for Seeder#run The `seed.run` command returns a array of a single item, and that item contains the array of strings (filepaths of seeds that were run). --- types/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/index.d.ts b/types/index.d.ts index 1fbb8cc22c..cdf3c82fcb 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -1826,7 +1826,7 @@ declare namespace Knex { class Seeder { constructor(knex: Knex); setConfig(config: SeederConfig): SeederConfig; - run(config?: SeederConfig): Promise; + run(config?: SeederConfig): Promise<[string[]]>; make(name: string, config?: SeederConfig): Promise; } From 3db77d616f97cac63bb77ab4b83f14ae2c442256 Mon Sep 17 00:00:00 2001 From: ksmithut Date: Mon, 14 Oct 2019 08:12:39 -0600 Subject: [PATCH 2/2] fix for types --- types/test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/test.ts b/types/test.ts index be9bccc1ea..3f45085d14 100644 --- a/types/test.ts +++ b/types/test.ts @@ -1203,10 +1203,10 @@ const main = async () => { directory: 'lib/seeds' }); - // $ExpectType string[] + // $ExpectType [string[]] await knex.seed.run(); - // $ExpectType string[] + // $ExpectType [string[]] await knex.seed.run({ extension: 'ts', directory: 'lib/seeds'