mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-01 09:01:45 +08:00
Attempts to fix new errors.
```
knex/knex-tests.ts(500,16): error TS2339: Property 'name' does not exist on type 'string'.
knex/knex-tests.ts(502,9): error TS2345: Argument of type '(names: string) => void' is not assignable to parameter of type '(value: any[]) => void | PromiseLike<void>'.
Types of parameters 'names' and 'value' are incompatible.
Type 'string' is not assignable to type 'any[]'.
```
https://travis-ci.org/DefinitelyTyped/DefinitelyTyped/builds/119592117
This commit is contained in:
@@ -495,8 +495,8 @@ query.then(function(x: any) {
|
||||
return x;
|
||||
});
|
||||
|
||||
knex.select('name').from('users').limit(10).then(function (rows: any[]) {
|
||||
return rows.map(function (row: string) {
|
||||
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) {
|
||||
|
||||
Reference in New Issue
Block a user