Skip to content

Commit

Permalink
docs: full Schema generics definition re: code review on #14542
Browse files Browse the repository at this point in the history
  • Loading branch information
vkarpov15 committed Apr 29, 2024
1 parent 72e4957 commit d5bd91d
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion docs/typescript/schemas.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,18 @@ The Mongoose `Schema` class in TypeScript has 9 [generic parameters](https://www
<summary>View TypeScript definition</summary>

```typescript
class Schema<RawDocType = any, M = Model<DocType, any, any>, TInstanceMethods = {}, TQueryHelpers = {}> extends events.EventEmitter {
export class Schema<
RawDocType = any,
TModelType = Model<RawDocType, any, any, any>,
TInstanceMethods = {},
TQueryHelpers = {},
TVirtuals = {},
TStaticMethods = {},
TSchemaOptions = DefaultSchemaOptions,
DocType = ...,
THydratedDocumentType = HydratedDocument<FlatRecord<DocType>, TVirtuals & TInstanceMethods>
>
extends events.EventEmitter {
// ...
}
```
Expand Down

0 comments on commit d5bd91d

Please sign in to comment.