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.
This commit is contained in:
ShaySEY
2016-02-29 22:40:45 +02:00
parent c0d876601e
commit 5199b9a759
+1 -1
View File
@@ -88,7 +88,7 @@ declare module 'bookshelf' {
belongsTo<R extends Model<any>>(target : {new(...args : any[]) : R}, foreignKey? : string) : R;
belongsToMany<R extends Model<any>>(target : {new(...args : any[]) : R}, table? : string, foreignKey? : string, otherKey? : string) : Collection<R>;
count(column? : string, options? : SyncOptions) : Promise<number>;
destroy(options : SyncOptions) : void;
destroy(options : SyncOptions) : Promise<T>;
fetch(options? : FetchOptions) : Promise<T>;
fetchAll(options? : FetchAllOptions) : Promise<Collection<T>>;
hasMany<R extends Model<any>>(target : {new(...args : any[]) : R}, foreignKey? : string) : Collection<R>;