Skip to content

Commit 9675a31

Browse files
Merge pull request #2517 from arkist/mongoose-document
docs(mongo): change the way to define the mongoose document interface
2 parents 0d16089 + 3a397c6 commit 9675a31

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

content/techniques/mongo.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ Let's define the `CatSchema`:
3434
```typescript
3535
@@filename(schemas/cat.schema)
3636
import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
37-
import { Document } from 'mongoose';
37+
import { HydratedDocument } from 'mongoose';
3838

39-
export type CatDocument = Cat & Document;
39+
export type CatDocument = HydratedDocument<Cat>;
4040

4141
@Schema()
4242
export class Cat {

0 commit comments

Comments
 (0)