DefinitelyTyped/bookshelf
Tanguy Krotoff bb5d8ea26c Improve bookshelf.d.ts and tests (#9297)
* 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>
2016-05-15 02:43:57 +09:00
..
bookshelf-tests.ts Improve bookshelf.d.ts and tests (#9297) 2016-05-15 02:43:57 +09:00
bookshelf.d.ts Improve bookshelf.d.ts and tests (#9297) 2016-05-15 02:43:57 +09:00