From d6e7e3cd21ef49fb258a14e93e862b1becc7ec73 Mon Sep 17 00:00:00 2001 From: Sean Derrow Date: Sat, 13 Sep 2025 07:11:49 -0400 Subject: [PATCH] Fix schema property type description in SchemaType --- types/schematypes.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/schematypes.d.ts b/types/schematypes.d.ts index 13126571447..edbe44c52a1 100644 --- a/types/schematypes.d.ts +++ b/types/schematypes.d.ts @@ -322,8 +322,8 @@ declare module 'mongoose' { */ required(required: boolean, message?: string): this; - /** The schema this SchemaType instance is part of */ - schema: Schema; + /** If the SchemaType is a subdocument or document array, this is the schema of that subdocument */ + schema?: Schema; /** Sets default select() behavior for this path. */ select(val: boolean): this;