diff --git a/index.d.ts b/index.d.ts index 044c0d1545..97a2f1da50 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1045,14 +1045,14 @@ declare module 'mongoose' { type SchemaPreOptions = { document?: boolean, query?: boolean }; type SchemaPostOptions = { document?: boolean, query?: boolean }; - class Schema = Model> extends events.EventEmitter { + class Schema = Model, SchemaDefModel = undefined> extends events.EventEmitter { /** * Create a new schema */ - constructor(definition?: SchemaDefinition, options?: SchemaOptions); + constructor(definition?: SchemaDefinition, options?: SchemaOptions); /** Adds key path / schema type pairs to this schema. */ - add(obj: SchemaDefinition | Schema, prefix?: string): this; + add(obj: SchemaDefinition | Schema, prefix?: string): this; /** * Array of child schemas (from document arrays and single nested subdocs)