mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-22 03:37:53 +08:00
Merge pull request #6371 from BrandonCKrueger/update-mongodb-object-class
Updating ObjectID to match current spec
This commit is contained in:
8
mongodb/mongodb.d.ts
vendored
8
mongodb/mongodb.d.ts
vendored
@@ -127,6 +127,14 @@ declare module "mongodb" {
|
||||
// Creates an ObjectID from a hex string representation of an ObjectID.
|
||||
// hexString – create a ObjectID from a passed in 24 byte hexstring.
|
||||
public static createFromHexString(hexString: string): ObjectID;
|
||||
|
||||
// Checks if a value is a valid bson ObjectId
|
||||
// id - Value to be checked
|
||||
public static isValid(id: string): Boolean;
|
||||
|
||||
// Generate a 12 byte id string used in ObjectID's
|
||||
// time - optional parameter allowing to pass in a second based timestamp
|
||||
public generate(time?: number): string;
|
||||
}
|
||||
|
||||
// Class documentation : http://mongodb.github.io/node-mongodb-native/api-bson-generated/binary.html
|
||||
|
||||
Reference in New Issue
Block a user