Skip to content

Commit

Permalink
Merge branch 'master' into 8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
vkarpov15 committed Oct 24, 2023
2 parents f923f6c + 7efa151 commit 9e9ad37
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/typescript/query-helpers.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ The 2nd generic parameter, `TQueryHelpers`, should be an interface that contains
Below is an example of creating a `ProjectModel` with a `byName` query helper.

```typescript
import { HydratedDocument, Model, Query, Schema, model } from 'mongoose';
import { HydratedDocument, Model, QueryWithHelpers, Schema, model, connect } from 'mongoose';

interface Project {
name?: string;
Expand Down Expand Up @@ -64,7 +64,7 @@ ProjectSchema.query.byName = function byName(
};

// 2nd param to `model()` is the Model class to return.
const ProjectModel = model<Project, ProjectModelType>('Project', schema);
const ProjectModel = model<Project, ProjectModelType>('Project', ProjectSchema);

run().catch(err => console.log(err));

Expand Down

0 comments on commit 9e9ad37

Please sign in to comment.