Skip to content

Commit 8793964

Browse files
committed
sample(mongoose): use HydratedDocument for define document interface
ref: nestjs/docs.nestjs.com#2517
1 parent b4dc2ee commit 8793964

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sample/06-mongoose/src/cats/schemas/cat.schema.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
2-
import { Document } from 'mongoose';
2+
import { HydratedDocument } from 'mongoose';
33

4-
export type CatDocument = Cat & Document;
4+
export type CatDocument = HydratedDocument<Cat>;
55

66
@Schema()
77
export class Cat {

0 commit comments

Comments
 (0)