diff --git a/types/index.d.ts b/types/index.d.ts index 50955f3eec..94d12f3d77 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -1258,7 +1258,7 @@ declare namespace Knex { // we can extend our selection by these columns (columnName: '*'): QueryBuilder< TRecord, - DeferredKeySelection[] + ArrayIfAlready> >; < diff --git a/types/test.ts b/types/test.ts index f3aeeae424..cb8bc9b501 100644 --- a/types/test.ts +++ b/types/test.ts @@ -117,6 +117,14 @@ const main = async () => { // $ExpectType any await knex('users').first('id'); + // $ExpectType any + await knex + .first('*') + .from('table') + .where({ + whatever: 'whatever' + }); + // $ExpectType any await knex('users').first('id', 'name');