@@ -33,7 +33,7 @@ import {
33
33
ns ,
34
34
resolveOptions
35
35
} from './utils' ;
36
- import type { W , WriteConcern } from './write_concern' ;
36
+ import type { W , WriteConcern , WriteConcernSettings } from './write_concern' ;
37
37
38
38
/** @public */
39
39
export const ServerApiVersion = Object . freeze ( {
@@ -183,14 +183,28 @@ export interface MongoClientOptions extends BSONSerializeOptions, SupportedNodeC
183
183
directConnection ?: boolean ;
184
184
/** Instruct the driver it is connecting to a load balancer fronting a mongos like service */
185
185
loadBalanced ?: boolean ;
186
-
187
- /** The write concern w value */
186
+ /**
187
+ * The write concern w value
188
+ * @deprecated Please use the `writeConcern` option instead
189
+ */
188
190
w ?: W ;
189
- /** The write concern timeout */
191
+ /**
192
+ * The write concern timeout
193
+ * @deprecated Please use the `writeConcern` option instead
194
+ */
190
195
wtimeoutMS ?: number ;
191
- /** The journal write concern */
196
+ /**
197
+ * The journal write concern
198
+ * @deprecated Please use the `writeConcern` option instead
199
+ */
192
200
journal ?: boolean ;
193
-
201
+ /**
202
+ * A MongoDB WriteConcern, which describes the level of acknowledgement
203
+ * requested from MongoDB for write operations.
204
+ *
205
+ * @see https://docs.mongodb.com/manual/reference/write-concern/
206
+ */
207
+ writeConcern ?: WriteConcern | WriteConcernSettings ;
194
208
/** Validate mongod server certificate against Certificate Authority */
195
209
sslValidate ?: boolean ;
196
210
/** SSL Certificate file path. */
0 commit comments