Skip to content

Commit 2648088

Browse files
committedMar 31, 2021
fix(index.d.ts): add DocumentQuery type for backwards compatibility
Fix #10036
1 parent 7d2e9c9 commit 2648088

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed
 

‎index.d.ts

+2
Original file line numberDiff line numberDiff line change
@@ -2715,6 +2715,8 @@ declare module 'mongoose' {
27152715
/** Alias for QueryOptions for backwards compatability. */
27162716
type ModelUpdateOptions = QueryOptions;
27172717

2718+
type DocumentQuery<ResultType, DocType extends Document, THelpers = {}> = Query<ResultType, DocType, THelpers>;
2719+
27182720
/** Backwards support for DefinitelyTyped */
27192721
interface HookSyncCallback<T> {
27202722
(this: T, next: HookNextFunction, docs: any[]): Promise<any> | void;

0 commit comments

Comments
 (0)
Please sign in to comment.