mirror of
https://github.com/nodejs/node.git
synced 2025-04-30 23:56:58 +00:00

PR-URL: https://github.com/nodejs/node/pull/40415 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
20 lines
807 B
TypeScript
20 lines
807 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;
|
|
}
|
|
}
|
|
|
|
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;
|
|
};
|