mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
bookshelf:: count return type fix and bump knex version (#37608)
* Update index.d.ts See https://github.com/bookshelf/bookshelf/issues/1275 * Bump knex dependency version to correspond to new bookshelf version
This commit is contained in:
parent
4b966494ee
commit
d1d0effcf9
6
types/bookshelf/index.d.ts
vendored
6
types/bookshelf/index.d.ts
vendored
@ -90,7 +90,7 @@ declare namespace Bookshelf {
|
||||
|
||||
class Model<T extends Model<any>> extends ModelBase<T> {
|
||||
static collection<T extends Model<any>>(models?: T[], options?: CollectionOptions<T>): Collection<T>;
|
||||
static count(column?: string, options?: SyncOptions): BlueBird<number>;
|
||||
static count(column?: string, options?: SyncOptions): BlueBird<number | string>;
|
||||
/** @deprecated use Typescript classes */
|
||||
static extend<T extends Model<any>>(prototypeProperties?: any, classProperties?: any): Function; // should return a type
|
||||
static fetchAll<T extends Model<any>>(): BlueBird<Collection<T>>;
|
||||
@ -101,7 +101,7 @@ declare namespace Bookshelf {
|
||||
|
||||
belongsTo<R extends Model<any>>(target: { new (...args: any[]): R }, foreignKey?: string, foreignKeyTarget?: string): R;
|
||||
belongsToMany<R extends Model<any>>(target: { new (...args: any[]): R }, table?: string, foreignKey?: string, otherKey?: string, foreignKeyTarget?: string, otherKeyTarget?: string): Collection<R>;
|
||||
count(column?: string, options?: SyncOptions): BlueBird<number>;
|
||||
count(column?: string, options?: SyncOptions): BlueBird<number | string>;
|
||||
destroy(options?: DestroyOptions): BlueBird<T>;
|
||||
fetch(options?: FetchOptions): BlueBird<T>;
|
||||
fetchAll(options?: FetchAllOptions): BlueBird<Collection<T>>;
|
||||
@ -244,7 +244,7 @@ declare namespace Bookshelf {
|
||||
static forge<T>(attributes?: any, options?: ModelOptions): T;
|
||||
|
||||
attach(ids: any | any[], options?: SyncOptions): BlueBird<Collection<T>>;
|
||||
count(column?: string, options?: SyncOptions): BlueBird<number>;
|
||||
count(column?: string, options?: SyncOptions): BlueBird<number | string>;
|
||||
create(model: { [key: string]: any }, options?: CollectionCreateOptions): BlueBird<T>;
|
||||
detach(ids: any[], options?: SyncOptions): BlueBird<any>;
|
||||
detach(options?: SyncOptions): BlueBird<any>;
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"knex": "^0.16.1"
|
||||
"knex": "^0.17.0"
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user