forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
buffers.d.ts
36 lines (28 loc) · 1.09 KB
/
buffers.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// Type definitions for buffers 0.1.1
// Project: https://github.com/substack/node-buffers
// Definitions by: Robert Hencke <https://github.com/rhencke/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../node/node.d.ts"/>
declare module "buffers" {
interface BuffersStatics {
new (bufs?: Buffer[]|Buffers): Buffers;
(bufs?: Buffer[]| Buffers): Buffers;
prototype: Buffers;
}
interface Buffers {
buffers: Buffer[];
length: number;
push(...items: Buffer[]): number;
unshift(...items: Buffer[]): number;
slice(i?: number, j?: number): Buffer;
splice(i: number, howMany?: number, ...items: Buffer[]): Buffers;
copy(dst: Buffer, dstStart?: number, start?: number, end?: number): number;
get(i: number): any;
set(i: number, b: any): void;
indexOf(needle: string|Buffer, offset?: number): number;
toBuffer(): Buffer;
toString(encoding?: any, start?: number, end?: number): string;
}
var Buffers: BuffersStatics;
export = Buffers;
}