不要怂,就是干,撸起袖子干!

You need to sign in or sign up before continuing.
Commit e1e82ed3 by Dan Rumney Committed by Sushant

fix(typings): correct overloaded method order (#11727)

1 parent 1c49827f
Showing with 6 additions and 6 deletions
......@@ -1794,24 +1794,24 @@ export abstract class Model<T = any, T2 = any> extends Hooks {
*/
public static findByPk<M extends Model>(
this: { new (): M } & typeof Model,
identifier?: Identifier,
options?: Omit<FindOptions, 'where'>
): Promise<M | null>;
public static findByPk<M extends Model>(
this: { new (): M } & typeof Model,
identifier: Identifier,
options: Omit<NonNullFindOptions, 'where'>
): Promise<M>;
public static findByPk<M extends Model>(
this: { new (): M } & typeof Model,
identifier?: Identifier,
options?: Omit<FindOptions, 'where'>
): Promise<M | null>;
/**
* Search for a single instance. This applies LIMIT 1, so the listener will always be called with a single
* instance.
*/
public static findOne<M extends Model>(this: { new (): M } & typeof Model, options: NonNullFindOptions): Promise<M>;
public static findOne<M extends Model>(
this: { new (): M } & typeof Model,
options?: FindOptions
): Promise<M | null>;
public static findOne<M extends Model>(this: { new (): M } & typeof Model, options: NonNullFindOptions): Promise<M>;
/**
* Run an aggregation method on the specified field
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!