Skip to content

Commit 1025f4a

Browse files
committed
fix(mongo-pagination): types injection
1 parent 53ecced commit 1025f4a

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

packages/mongo-pagination/src/mongoose-8.ts

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,11 @@ function paginatorNext(this: MongooseQuery, nextToken: string) {
4242

4343
declare module 'mongoose' {
4444
/**
45-
* Patch original mongoose types
45+
* Patch original mongoose types for mongoose 8
4646
*/
4747
// @ts-expect-error
48-
class Query<
49-
ResultType,
50-
DocType,
51-
THelpers = {},
52-
RawDocType = unknown,
53-
QueryOp = 'find',
54-
TInstanceMethods = Record<string, never>,
55-
> implements SessionOperation
56-
{
57-
paginator(options?: QueryPaginatorOptions): QueryPaginator<ResultType>;
58-
paginatorNext(nextToken: string): QueryPaginator<ResultType>;
48+
interface Query<ResultType, DocType> {
49+
paginator(options?: QueryPaginatorOptions): QueryPaginator<DocType>;
50+
paginatorNext(nextToken: string): QueryPaginator<DocType>;
5951
}
6052
}

0 commit comments

Comments
 (0)