@@ -33,7 +33,7 @@ import {
3333 ns ,
3434 resolveOptions
3535} from './utils' ;
36- import type { W , WriteConcern } from './write_concern' ;
36+ import type { W , WriteConcern , WriteConcernSettings } from './write_concern' ;
3737
3838/** @public */
3939export const ServerApiVersion = Object . freeze ( {
@@ -183,14 +183,28 @@ export interface MongoClientOptions extends BSONSerializeOptions, SupportedNodeC
183183 directConnection ?: boolean ;
184184 /** Instruct the driver it is connecting to a load balancer fronting a mongos like service */
185185 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+ */
188190 w ?: W ;
189- /** The write concern timeout */
191+ /**
192+ * The write concern timeout
193+ * @deprecated Please use the `writeConcern` option instead
194+ */
190195 wtimeoutMS ?: number ;
191- /** The journal write concern */
196+ /**
197+ * The journal write concern
198+ * @deprecated Please use the `writeConcern` option instead
199+ */
192200 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 ;
194208 /** Validate mongod server certificate against Certificate Authority */
195209 sslValidate ?: boolean ;
196210 /** SSL Certificate file path. */
0 commit comments