doc for Model constructor (new) should be optional

This commit is contained in:
Gary Hamilton
2015-07-01 15:00:14 +01:00
parent c7b1128cc9
commit fdc6193b12
+1 -1
View File
@@ -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[]>;