-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
38 lines (38 loc) · 1.01 KB
/
index.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
/// <reference types="node" />
import * as stream from 'stream';
declare global {
namespace Bua {
interface Header {
name: string;
size: number;
mtime?: number;
mode?: number;
type: 'file' | 'directory';
}
interface IndexHeader {
size: number;
mtime: number;
mode: number;
type: 'file' | 'directory';
nameLength: number;
}
}
}
declare class ExtractStream extends stream.Readable {
constructor();
skip(cb: () => void): void;
}
export declare class Extract {
input: stream.Writable;
private entryHandler;
constructor();
entry(cb: (header: Bua.Header, stream: ExtractStream, next: (err?: any) => void) => void): void;
}
export declare class Pack {
output: stream.Readable;
constructor();
finalize(): void;
entry(header: Bua.Header, cb: (err?: Error) => void): stream.Writable;
writeHeader(header: Bua.Header): void;
}
export {};