Commit Graph

13 Commits

Author SHA1 Message Date
James Bracy
93c264dda2 Adding missing static methods to Bookshelf
- Model.where
2016-09-20 12:32:04 -07:00
Leonard Hecker
568ec4378d Fixed references to Bluebird 2.0 2016-08-11 13:13:12 +02:00
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
Róbert Kiss
a9b1e55740 Model.save method is more common if the type of value is any instead of string (#9314) 2016-05-15 02:33:58 +09:00
Robin Joseph
869bd9c489 Update bookshelf.d.ts (#9101) 2016-04-26 00:41:51 +09:00
vvakame
56295f5058 replace https://github.com/borisyankov/DefinitelyTyped to https://github.com/DefinitelyTyped/DefinitelyTyped 2016-03-17 00:55:26 +09:00
Shantanu Raj
d3c388b04d options param in destroy is optional 2016-03-15 17:31:12 +05:30
ShaySEY
5199b9a759 Update bookshelf.d.ts
The destroy signature method is not compatible with the bookshelf.js library.
It should return a Promise<T>  - destroy is async method.
2016-02-29 22:40:45 +02:00
vvakame
9027703c0b pass npm run all in new definition-tester 2016-02-10 00:16:03 +09:00
DomiR
808a31e15f (feature) Fist step to upgrade lodash to 4.0.0 2016-01-23 14:39:10 +01:00
Ville Lahdenvuo
68fb3b7b5a Add static plugin method to definitions. 2016-01-08 16:50:03 +02:00
Tanguy Krotoff
0d7e1be8b4 Remove trailing spaces
Trailing spaces make it hard to contribute
2015-12-13 18:58:34 +01:00
Andrew Schurman
30811e892f bookshelf: initial typescript mappings 2015-11-15 23:30:45 -08:00