feat: allow passing a ReadableStream to Deno.writeFile/Deno.writeTextFile (#17329)

Closes #13229
This commit is contained in:
Leo Kettmeir 2023-01-12 03:37:23 +01:00 committed by GitHub
parent 692f9af14a
commit a6b3910bdf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 70 additions and 14 deletions

View file

@ -3364,7 +3364,7 @@ declare namespace Deno {
*/
export function writeFile(
path: string | URL,
data: Uint8Array,
data: Uint8Array | ReadableStream<Uint8Array>,
options?: WriteFileOptions,
): Promise<void>;
@ -3407,7 +3407,7 @@ declare namespace Deno {
*/
export function writeTextFile(
path: string | URL,
data: string,
data: string | ReadableStream<string>,
options?: WriteFileOptions,
): Promise<void>;