mirror of
https://github.com/nodejs/node.git
synced 2024-11-22 07:37:56 +01:00
da7962fd4d
PR-URL: https://github.com/nodejs/node/pull/49742 Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com> Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
20 lines
784 B
TypeScript
20 lines
784 B
TypeScript
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;
|
|
}
|
|
}
|
|
|
|
export interface BlobBinding {
|
|
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;
|
|
}
|