Skip to content

Commit 217101d

Browse files
committed
async keyword withTransaction and agg.explain
1 parent bfaf3c9 commit 217101d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/cursor/aggregation_cursor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export class AggregationCursor<TSchema = any> extends AbstractCursor<TSchema> {
7777
}
7878

7979
/** Execute the explain for the cursor */
80-
explain(verbosity?: ExplainVerbosityLike): Promise<Document> {
80+
async explain(verbosity?: ExplainVerbosityLike): Promise<Document> {
8181
return executeOperation(
8282
this.client,
8383
new AggregateOperation(this.namespace, this[kPipeline], {

src/sessions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ export class ClientSession extends TypedEventEmitter<ClientSessionEvents> {
444444
* @param options - optional settings for the transaction
445445
* @returns A raw command response or undefined
446446
*/
447-
withTransaction<T = void>(
447+
async withTransaction<T = void>(
448448
fn: WithTransactionCallback<T>,
449449
options?: TransactionOptions
450450
): Promise<Document | undefined> {

0 commit comments

Comments
 (0)