Skip to content

Commit bbc61b7

Browse files
cleanups
1 parent e1c3949 commit bbc61b7

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

src/operations/command.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,14 +223,13 @@ export abstract class ModernizedCommandOperation<T> extends ModernizedOperation<
223223
abstract buildCommandDocument(connection: Connection, session?: ClientSession): Document;
224224

225225
override buildOptions(timeoutContext: TimeoutContext): ServerCommandOptions {
226-
const options = {
226+
return {
227227
...this.options,
228228
...this.bsonOptions,
229229
timeoutContext,
230230
readPreference: this.readPreference,
231231
session: this.session
232232
};
233-
return options;
234233
}
235234

236235
override buildCommand(connection: Connection, session?: ClientSession): Document {

src/operations/run_command.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import type { ServerCommandOptions } from '../sdam/server';
1212
import type { ClientSession } from '../sessions';
1313
import { type TimeoutContext } from '../timeout';
1414
import { MongoDBNamespace } from '../utils';
15-
import { type WriteConcern } from '../write_concern';
1615
import { ModernizedCommandOperation } from './command';
1716

1817
/** @public */
@@ -85,17 +84,15 @@ export class RunAdminCommandOperation<T = Document> extends ModernizedCommandOpe
8584
override SERVER_COMMAND_RESPONSE_TYPE = MongoDBResponse;
8685
command: Document;
8786
override options: RunCommandOptions & {
88-
writeConcern?: WriteConcern;
89-
bypassPinningCheck?: boolean;
9087
noResponse?: boolean;
88+
bypassPinningCheck?: boolean;
9189
};
9290

9391
constructor(
9492
command: Document,
9593
options: RunCommandOptions & {
96-
writeConcern?: WriteConcern;
97-
bypassPinningCheck?: boolean;
9894
noResponse?: boolean;
95+
bypassPinningCheck?: boolean;
9996
}
10097
) {
10198
super(undefined, options);

0 commit comments

Comments
 (0)