mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-24 05:06:02 +08:00
Added Binary class to mongodb.
This commit is contained in:
20
mongodb/mongodb.d.ts
vendored
20
mongodb/mongodb.d.ts
vendored
@@ -129,6 +129,26 @@ declare module "mongodb" {
|
||||
public static createFromHexString(hexString: string): ObjectID;
|
||||
}
|
||||
|
||||
// Class documentation : http://mongodb.github.io/node-mongodb-native/api-bson-generated/binary.html
|
||||
export class Binary {
|
||||
constructor (buffer: Buffer, subType?: number);
|
||||
|
||||
// Updates this binary with byte_value
|
||||
put(byte_value: any): void;
|
||||
|
||||
// Writes a buffer or string to the binary
|
||||
write(buffer: any, offset: number): void;
|
||||
|
||||
// Reads length bytes starting at position.
|
||||
read(position: number, length: number): Buffer;
|
||||
|
||||
// Returns the value of this binary as a string.
|
||||
value(): string;
|
||||
|
||||
// The length of the binary.
|
||||
length(): number;
|
||||
}
|
||||
|
||||
export interface SocketOptions {
|
||||
//= set seconds before connection times out default:0
|
||||
timeout?: number;
|
||||
|
||||
Reference in New Issue
Block a user