forked from nodejs/node
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathblob.d.ts
More file actions
19 lines (17 loc) · 807 Bytes
/
blob.d.ts
File metadata and controls
19 lines (17 loc) · 807 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
declare namespace InternalBlobBinding {
interface BlobHandle {
slice(start: number, end: number): BlobHandle;
}
class FixedSizeBlobCopyJob {
constructor(handle: BlobHandle);
run(): ArrayBuffer | undefined;
ondone: (err: unknown, res?: ArrayBuffer) => void;
}
}
declare function InternalBinding(binding: 'blob'): {
createBlob(sources: Array<Uint8Array | InternalBlobBinding.BlobHandle>, length: number): InternalBlobBinding.BlobHandle;
FixedSizeBlobCopyJob: typeof InternalBlobBinding.FixedSizeBlobCopyJob;
getDataObject(id: string): [handle: InternalBlobBinding.BlobHandle | undefined, length: number, type: string] | undefined;
storeDataObject(id: string, handle: InternalBlobBinding.BlobHandle, size: number, type: string): void;
revokeDataObject(id: string): void;
};