mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-10-25 12:00:38 +08:00
doc for Model constructor (new) should be optional
This commit is contained in:
1 parent
c7b1128cc9
commit
fdc6193b12
1 file changed
+1
-1
Vendored
+1
-1
@@ -135,7 +135,7 @@ declare module "mongoose" {
|
||||
}
|
||||
|
||||
export interface Model<T extends Document> extends NodeJS.EventEmitter {
|
||||
new(doc: Object): T;
|
||||
new(doc?: Object): T;
|
||||
|
||||
aggregate(...aggregations: Object[]): Aggregate<T[]>;
|
||||
aggregate(aggregation: Object, callback: (err: any, res: T[]) => void): Promise<T[]>;
|
||||
|
||||
Reference in new issue
Block a user