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;