mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-13 12:37:16 +08:00
Updated DbCreateOptions.promoteBuffers to be boolean, updated docs
Existing value was a number and the comment associated was not the correct information. Updated to be a boolean and updated comment to be from https://mongodb.github.io/node-mongodb-native/3.0/api/MongoClient.html#.connect
This commit is contained in:
8
types/mongodb/index.d.ts
vendored
8
types/mongodb/index.d.ts
vendored
@@ -93,7 +93,7 @@ export interface MongoClientOptions extends
|
||||
logger?: Object;
|
||||
// Default: false;
|
||||
validateOptions?: Object;
|
||||
// The name of the application that created this MongoClient instance.
|
||||
// The name of the application that created this MongoClient instance.
|
||||
appname?: string;
|
||||
}
|
||||
|
||||
@@ -160,8 +160,8 @@ export interface DbCreateOptions extends CommonOptions {
|
||||
raw?: boolean;
|
||||
// Default: true; Promotes Long values to number if they fit inside the 53 bits resolution.
|
||||
promoteLongs?: boolean;
|
||||
// Default: -1 (unlimited); Amount of operations the driver buffers up untill discard any new ones
|
||||
promoteBuffers?: number;
|
||||
// Default: false; Promotes Binary BSON values to native Node Buffers
|
||||
promoteBuffers?: boolean;
|
||||
// the prefered read preference. use 'ReadPreference' class.
|
||||
readPreference?: ReadPreference | string;
|
||||
// Default: true; Promotes BSON values to native types where possible, set to false to only receive wrapper types.
|
||||
@@ -1495,7 +1495,7 @@ export interface ChangeStreamOptions {
|
||||
}
|
||||
|
||||
type GridFSBucketWriteStreamId = string | number | Object | ObjectID;
|
||||
|
||||
|
||||
export interface LoggerOptions {
|
||||
loggerLevel?: string // Custom logger function
|
||||
logger?: log // Override default global log level.
|
||||
|
||||
@@ -25,7 +25,8 @@ let options: mongodb.MongoClientOptions = {
|
||||
sslCA: ['str'],
|
||||
sslCert: new Buffer(999),
|
||||
sslKey: new Buffer(999),
|
||||
sslPass: new Buffer(999)
|
||||
sslPass: new Buffer(999),
|
||||
promoteBuffers: false
|
||||
}
|
||||
MongoClient.connect('mongodb://127.0.0.1:27017/test', options, function (err: mongodb.MongoError, client: mongodb.MongoClient) {
|
||||
if (err) throw err;
|
||||
|
||||
Reference in New Issue
Block a user