Skip to content

Commit d6e7e3c

Browse files
committed
Fix schema property type description in SchemaType
1 parent adc1799 commit d6e7e3c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

types/schematypes.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,8 +322,8 @@ declare module 'mongoose' {
322322
*/
323323
required(required: boolean, message?: string): this;
324324

325-
/** The schema this SchemaType instance is part of */
326-
schema: Schema<any>;
325+
/** If the SchemaType is a subdocument or document array, this is the schema of that subdocument */
326+
schema?: Schema<any>;
327327

328328
/** Sets default select() behavior for this path. */
329329
select(val: boolean): this;

0 commit comments

Comments
 (0)