Skip to content

Commit

Permalink
feat: fix return type of Connection.withSession
Browse files Browse the repository at this point in the history
  • Loading branch information
tt-public committed Jun 25, 2024
1 parent 561a580 commit cc63f69
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion types/connection.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ declare module 'mongoose' {
/** Watches the entire underlying database for changes. Similar to [`Model.watch()`](/docs/api/model.html#model_Model-watch). */
watch<ResultType extends mongodb.Document = any>(pipeline?: Array<any>, options?: mongodb.ChangeStreamOptions): mongodb.ChangeStream<ResultType>;

withSession<T = any>(executor: (session: ClientSession) => Promise<T>): T;
withSession<T = any>(executor: (session: ClientSession) => Promise<T>): Promise<T>;
}

}

0 comments on commit cc63f69

Please sign in to comment.