-
-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathglobal.d.ts
40 lines (32 loc) · 1.05 KB
/
global.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
37
38
39
40
declare module 'http-parser-js' {
export class HTTPParser {
static REQUEST: string;
static RESPONSE: string;
constructor(type?: string);
info: {
headers: string[];
upgrade: boolean;
statusCode?: number;
};
execute: (chunk: Buffer, start?: number, length?: number) => number;
onHeadersComplete: (info: {
versionMajor: string;
versionMinor: string;
headers: string[];
method: string | null;
url: string | null;
statusCode: number | null;
statusMessage: string | null;
upgrade: boolean;
shouldKeepAlive: boolean;
}) => void;
onMessageComplete: () => void;
onBody: (data: Buffer, offset: number, length: number) => void;
}
}
declare module 'node-hkdf-sync' {
export default class HKDF {
constructor(hashAlg: string, salt: Buffer | string, ikm: Buffer | string);
derive(info: Buffer | string, size: number): Buffer;
}
}