Skip to content

Commit

Permalink
Fixes types for Seeder#run (#3438)
Browse files Browse the repository at this point in the history
  • Loading branch information
ksmithut authored and kibertoad committed Oct 14, 2019
1 parent b0c0db6 commit 767904c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion types/index.d.ts
Expand Up @@ -1842,7 +1842,7 @@ declare namespace Knex {
class Seeder {
constructor(knex: Knex);
setConfig(config: SeederConfig): SeederConfig;
run(config?: SeederConfig): Promise<string[]>;
run(config?: SeederConfig): Promise<[string[]]>;
make(name: string, config?: SeederConfig): Promise<string>;
}

Expand Down
4 changes: 2 additions & 2 deletions types/test.ts
Expand Up @@ -1303,10 +1303,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'
Expand Down

0 comments on commit 767904c

Please sign in to comment.