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:
Ryan Smith
2016-03-30 18:22:39 +01:00
parent 905ee7e6f5
commit ff6d2d2b90

View File

@@ -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) {