Skip to content

Instantly share code, notes, and snippets.

@Elvincth
Created August 22, 2022 10:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Elvincth/0e8735cde4c4751162ced23e8de0100e to your computer and use it in GitHub Desktop.
Save Elvincth/0e8735cde4c4751162ced23e8de0100e to your computer and use it in GitHub Desktop.
mongoose-paginate-v2 typescript usage
schema.plugin(paginate);
export const CourseModel: PaginateModel<ICourse> =
(models.Course as PaginateModel<ICourse>) ||
model<ICourse, PaginateModel<ICourse>>("Course", schema);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment