deno.land / std@0.224.0 / streams / writable_stream_from_writer.ts

writable_stream_from_writer.ts
View Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.// This module is browser compatible.
import type { Writer } from "../io/types.ts";import { toWritableStream } from "../io/to_writable_stream.ts";
/** * Options for {@linkcode writableStreamFromWriter}. * * @deprecated This will be removed in 1.0.0. Use {@linkcode toWritableStream} instead. */export interface WritableStreamFromWriterOptions { /** * If the `writer` is also a `Closer`, automatically close the `writer` * when the stream is closed, aborted, or a write error occurs. * * @default {true} */ autoClose?: boolean;}
/** * Create a {@linkcode WritableStream} from a {@linkcode Writer}. * * @deprecated This will be removed in 1.0.0. Use {@linkcode toWritableStream} instead. */export function writableStreamFromWriter( writer: Writer, options: WritableStreamFromWriterOptions = {},): WritableStream<Uint8Array> { return toWritableStream(writer, options);}
std

Version Info

Tagged at
6 months ago