Skip to content

Commit 8a2b2cf

Browse files
authored
Merge pull request #15631 from sderrow/fix-schema-prop-type-desc-in-schematype
Fix `schema` property type definition in SchemaType
2 parents e86c102 + d6e7e3c commit 8a2b2cf

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)