Skip to main content
WritableStreamDefaultWriter - node__stream--web.d.ts - Node documentation
interface WritableStreamDefaultWriter

Usage in Deno

```typescript import { type WritableStreamDefaultWriter } from "node:node__stream--web.d.ts"; ```
This Streams API interface is the object returned by WritableStream.getWriter() and once created locks the < writer to the WritableStream ensuring that no other streams can write to the underlying sink.

Type Parameters

W = any

Properties

readonly
closed: Promise<undefined>
readonly
desiredSize: number | null
readonly
ready: Promise<undefined>

Methods

abort(reason?: any): Promise<void>
close(): Promise<void>
releaseLock(): void
write(chunk?: W): Promise<void>

Type Parameters

W = any
variable WritableStreamDefaultWriter
`WritableStreamDefaultWriter` class is a global reference for `import { WritableStreamDefaultWriter } from 'node:stream/web'`. https://nodejs.org/api/globals.html#class-writablestreamdefaultwriter

Type

globalThis extends { onmessage: any; WritableStreamDefaultWriter: infer T; } ? T : stream/web