Added additional overloads for the Join interface and extra description for the callback function, including a description of the parameter passed to it, which is an instance of JoinClause. Therefore, also added the JoinClause interface description. Finally, added two new method overloads for Where.
* Switch to ES6 imports
* Add attributes and length
* Various improvements + add more tests
- Fix destroy()
- Fix detach()
- Fix map()
- Add NotFoundError, NoRowsUpdatedError and NoRowsDeletedError on Model
* serialize() and toJSON() should return Object/Object[] instead of any
* Fix map()
* More tests taken from Bookshelf website + various fixes
- Fix Bookshelf.transaction return type
- Add id attribute on ModelBase
- Improve ModelBase.parse()
- Fix Model.query()
- Add a constructor to CollectionBase
- Fix CollectionBase.map()
- Fix Collection.attach()
- Fix Collection.query()
- Add Collection.EmptyError
- Fix LoadOptions and FetchOptions withRelated
* No need to specify Knex.QueryBuilder
* toJSON(): Object/Object[] is too restrictive, revert back to any/any[]
* Model.through() returns R, Collection.through() returns Collection<R>
* Added type definition for Knex.Migration
Signed-off-by: Emanuel Henrique do Prado <emanuel@tls.inf.br>
* Corrected Knex test according documentation (http://knexjs.org/#Migrations-currentVersion)
* Change name Migration to Migrator, according the original source
```
knex/knex-tests.ts(502,9): error TS2345: Argument of type '(names: string) => void' is not assignable to parameter of type '(value: string[]) => void | PromiseLike<void>'.
Types of parameters 'names' and 'value' are incompatible.
Type 'string' is not assignable to type 'string[]'.
knex/knex-tests.ts(522,4): error TS2339: Property 'bind' does not exist on type 'QueryBuilder'.
knex/knex-tests.ts(533,35): error TS2339: Property 'return' does not exist on type 'QueryBuilder'.
```
https://travis-ci.org/DefinitelyTyped/DefinitelyTyped/builds/119593429
```
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