From 89f424e0bae3505ef136f4c673b48e6442f84878 Mon Sep 17 00:00:00 2001 From: Valeri Karpov Date: Mon, 10 Feb 2025 10:31:47 -0500 Subject: [PATCH] types: add THydratedDocumentType in schema --- types/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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`