Skip to content

Commit

Permalink
fix(index.d.ts): add DocumentQuery type for backwards compatibility
Browse files Browse the repository at this point in the history
Fix #10036
  • Loading branch information
vkarpov15 committed Mar 31, 2021
1 parent 7d2e9c9 commit 2648088
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2715,6 +2715,8 @@ declare module 'mongoose' {
/** Alias for QueryOptions for backwards compatability. */
type ModelUpdateOptions = QueryOptions;

type DocumentQuery<ResultType, DocType extends Document, THelpers = {}> = Query<ResultType, DocType, THelpers>;

/** Backwards support for DefinitelyTyped */
interface HookSyncCallback<T> {
(this: T, next: HookNextFunction, docs: any[]): Promise<any> | void;
Expand Down

0 comments on commit 2648088

Please sign in to comment.