diff --git a/knex/knex-tests.ts b/knex/knex-tests.ts index cd67a08736..e983ec1084 100644 --- a/knex/knex-tests.ts +++ b/knex/knex-tests.ts @@ -499,7 +499,7 @@ knex.select('name').from('users').limit(10).then(function (rows: any[]): string[ return rows.map(function (row: any): string { return row.name; }); -}).then(function(names: string) { +}).then(function(names: string[]) { console.log(names); }).catch(function(e: Error) { console.error(e); @@ -519,19 +519,16 @@ knex.select('name').from('users').limit(10).then(function (rows: any[]) { knex.select('name').from('users') .limit(10) - .bind(console) - .then(console.log) - .catch(console.error); + .then(console.log.bind(console)) + .catch(console.error.bind(console)); var values: any[]; -// Without return: + knex.insert(values).into('users') .then(function() { return {inserted: true}; }); -knex.insert(values).into('users').return({inserted: true}); - knex.select('name').from('users') .where('id', '>', 20) .andWhere('id', '<', 200)