mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 22:30:01 +00:00
Merge pull request #21186 from SteveXian/enable-es6-promises-in-bookshelf-transaction
Bookshelf transaction incompatible with async/await due to forced Bluebird return type.
This commit is contained in:
4
types/bookshelf/index.d.ts
vendored
4
types/bookshelf/index.d.ts
vendored
@@ -1,4 +1,4 @@
|
||||
// Type definitions for bookshelfjs v0.9.3
|
||||
// Type definitions for bookshelfjs v0.9.4
|
||||
// Project: http://bookshelfjs.org/
|
||||
// Definitions by: Andrew Schurman <https://github.com/arcticwaters>, Vesa Poikajärvi <https://github.com/vesse>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
@@ -17,7 +17,7 @@ interface Bookshelf extends Bookshelf.Events<any> {
|
||||
Collection: typeof Bookshelf.Collection;
|
||||
|
||||
plugin(name: string | string[] | Function, options?: any): Bookshelf;
|
||||
transaction<T>(callback: (transaction: knex.Transaction) => BlueBird<T>): BlueBird<T>;
|
||||
transaction<T>(callback: (transaction: knex.Transaction) => PromiseLike<T>): BlueBird<T>;
|
||||
}
|
||||
|
||||
declare function Bookshelf(knex: knex): Bookshelf;
|
||||
|
||||
Reference in New Issue
Block a user