deno.land / std@0.224.0 / streams / writable_stream_from_writer.ts
123456789101112131415161718192021222324252627282930313233// 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);}
Version Info