diff --git a/types/index.d.ts b/types/index.d.ts index e8469d5b0d..ffd657d95d 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -273,10 +273,10 @@ declare module 'mongoose' { /** * Create a new schema */ - constructor(definition?: SchemaDefinition, RawDocType> | DocType, options?: SchemaOptions, TInstanceMethods, TQueryHelpers, TStaticMethods, TVirtuals, THydratedDocumentType> | ResolveSchemaOptions); + constructor(definition?: SchemaDefinition, RawDocType, THydratedDocumentType> | DocType, options?: SchemaOptions, TInstanceMethods, TQueryHelpers, TStaticMethods, TVirtuals, THydratedDocumentType> | ResolveSchemaOptions); /** Adds key path / schema type pairs to this schema. */ - add(obj: SchemaDefinition> | Schema, prefix?: string): this; + add(obj: SchemaDefinition, RawDocType> | Schema, prefix?: string): this; /** * Add an alias for `path`. This means getting or setting the `alias`