mirror of
https://github.com/yume-chan/ya-webadb.git
synced 2025-10-06 03:50:18 +02:00
refactor: add readonly
to many read only fields
This commit is contained in:
parent
05c01adbd1
commit
1d71971281
18 changed files with 66 additions and 67 deletions
|
@ -1,5 +1,4 @@
|
|||
import type { ReadableStream } from "@yume-chan/stream-extra";
|
||||
import { PushReadableStream } from "@yume-chan/stream-extra";
|
||||
import { ReadableStream } from "@yume-chan/stream-extra";
|
||||
import type { StructValue } from "@yume-chan/struct";
|
||||
import { buffer, struct, u32 } from "@yume-chan/struct";
|
||||
|
||||
|
@ -52,10 +51,5 @@ export function adbSyncPull(
|
|||
socket: AdbSyncSocket,
|
||||
path: string,
|
||||
): ReadableStream<Uint8Array> {
|
||||
// TODO: use `ReadableStream.from` when it's supported
|
||||
return new PushReadableStream(async (controller) => {
|
||||
for await (const data of adbSyncPullGenerator(socket, path)) {
|
||||
await controller.enqueue(data);
|
||||
}
|
||||
});
|
||||
return ReadableStream.from(adbSyncPullGenerator(socket, path));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue