Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
feat: fix return type of Connection.withSession
  • Loading branch information
apparedev committed Jun 25, 2024
commit cc63f6955ca4aa7b43b9c6ea880d55bbc01eecb4
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>;
}

}