mirror of
https://github.com/yume-chan/ya-webadb.git
synced 2025-10-06 03:50:18 +02:00
doc: update JSDoc
This commit is contained in:
parent
7f94da06e7
commit
443190e22a
6 changed files with 48 additions and 29 deletions
|
@ -19,7 +19,7 @@ export function adbSyncPull(
|
|||
stream: AdbBufferedStream,
|
||||
writer: WritableStreamDefaultWriter<ArrayBuffer>,
|
||||
path: string,
|
||||
highWaterMark: number = 16 * 1024,
|
||||
bufferSize: number = 16 * 1024,
|
||||
): ReadableStream<ArrayBuffer> {
|
||||
return new ReadableStream({
|
||||
async start(controller) {
|
||||
|
@ -37,13 +37,14 @@ export function adbSyncPull(
|
|||
break;
|
||||
case AdbSyncResponseId.Done:
|
||||
controller.close();
|
||||
return;
|
||||
break;
|
||||
default:
|
||||
controller.error(new Error('Unexpected response id'));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}, {
|
||||
highWaterMark,
|
||||
highWaterMark: bufferSize,
|
||||
size(chunk) { return chunk.byteLength; }
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue