Skip to content

Commit 7d98e2e

Browse files
committed
docs (mongo): update in subdocuments
Fixa misleading type annotation error in the subdocuements section of the documentation when defining a type override for the parent document
1 parent 23da51b commit 7d98e2e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

content/techniques/mongo.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,7 @@ export class Person {
624624
export const PersonSchema = SchemaFactory.createForClass(Person);
625625

626626
export type PersonDocumentOverride = {
627-
name: Types.Subdocument<Types.ObjectId & Name>;
627+
name: Types.Subdocument<Types.ObjectId> & Name;
628628
};
629629

630630
export type PersonDocument = HydratedDocument<Person, PersonDocumentOverride>;

0 commit comments

Comments
 (0)