Skip to content

Commit 9b449d6

Browse files
committed
docs: clarify that middleware context also relies on Schema THydratedDocumentType
1 parent c802909 commit 9b449d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/typescript/schemas.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,5 +220,5 @@ async function run() {
220220

221221
Use `HydratedArraySubdocument<RawDocType>` for the type of array subdocuments, and `HydratedSingleSubdocument<RawDocType>` for single subdocuments.
222222

223-
If you are not using [schema methods](../guide.html#methods) or [virtuals](../tutorials/virtuals.html), you can omit the last 7 generic parameters to `Schema()` and just define your schema using `new mongoose.Schema<IOrder, OrderModelType>(...)`.
223+
If you are not using [schema methods](../guide.html#methods), middleware, or [virtuals](../tutorials/virtuals.html), you can omit the last 7 generic parameters to `Schema()` and just define your schema using `new mongoose.Schema<IOrder, OrderModelType>(...)`.
224224
The THydratedDocumentType parameter for schemas is primarily for setting the value of `this` on methods and virtuals.

0 commit comments

Comments
 (0)