From d5bd91d520763cf47192b5e49a4de2184288390b Mon Sep 17 00:00:00 2001 From: Valeri Karpov Date: Mon, 29 Apr 2024 15:33:48 -0400 Subject: [PATCH] docs: full Schema generics definition re: code review on #14542 --- docs/typescript/schemas.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/typescript/schemas.md b/docs/typescript/schemas.md index 8986e56f9fe..e6397cbc6cf 100644 --- a/docs/typescript/schemas.md +++ b/docs/typescript/schemas.md @@ -81,7 +81,18 @@ The Mongoose `Schema` class in TypeScript has 9 [generic parameters](https://www View TypeScript definition ```typescript - class Schema, TInstanceMethods = {}, TQueryHelpers = {}> extends events.EventEmitter { + export class Schema< + RawDocType = any, + TModelType = Model, + TInstanceMethods = {}, + TQueryHelpers = {}, + TVirtuals = {}, + TStaticMethods = {}, + TSchemaOptions = DefaultSchemaOptions, + DocType = ..., + THydratedDocumentType = HydratedDocument, TVirtuals & TInstanceMethods> + > + extends events.EventEmitter { // ... } ```