feat: make consumable writable streams also accept raw values

This commit is contained in:
Simon Chan 2024-04-16 14:01:30 +08:00
parent d60ac95f47
commit d06b5f2ed6
No known key found for this signature in database
GPG key ID: A8B69F750B9BCEDD
31 changed files with 387 additions and 346 deletions

View file

@ -23,6 +23,7 @@ import {
} from "@yume-chan/scrcpy";
import type {
Consumable,
MaybeConsumable,
ReadableStream,
ReadableWritablePair,
} from "@yume-chan/stream-extra";
@ -100,7 +101,7 @@ export type AdbScrcpyAudioStreamMetadata =
export class AdbScrcpyClient {
static async pushServer(
adb: Adb,
file: ReadableStream<Consumable<Uint8Array>>,
file: ReadableStream<MaybeConsumable<Uint8Array>>,
filename = DEFAULT_SERVER_PATH,
) {
const sync = await adb.sync();