-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathnode.d.ts
More file actions
18 lines (18 loc) · 957 Bytes
/
node.d.ts
File metadata and controls
18 lines (18 loc) · 957 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
declare class Buffer extends Uint8Array {
/** This method allocates a new Buffer of indicated size. All of the data is zeroed. */
static alloc(size: i32): Buffer;
/** This method allocates a new Buffer of indicated size. This is unsafe because the data is not zeroed. */
static allocUnsafe(size: i32): Buffer;
/** This method is used for sorting Buffer objects. */
static compare(a: Buffer, b: Buffer): i32;
/** This method asserts a value is a Buffer object via `value instanceof Buffer`. */
static isBuffer<T>(value: T): bool;
/** Reads an unsigned integer at the designated offset. */
readUInt8(offset?: i32): u8;
/** Writes an inputted u8 value to the buffer, at the desired offset. */
writeUInt8(value:u8, offset?:i32): i32;
/** Writes an inputted value to the buffer, at the desired offset. */
writeInt8(value:i8, offset?:i32): i32;
/** Reads a signed integer at the designated offset. */
readInt8(offset?: i32): i8;
}