# Interface WritableStreamDefaultWriter<W>

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.

interface WritableStreamDefaultWriter<W> {
closed: Promise<undefined>;
desiredSize: null | number;
ready: Promise<undefined>;
abort(reason?): Promise<void>;
close(): Promise<void>;
releaseLock(): void;
write(chunk?): Promise<void>;
}

#### Type Parameters

- W = any

- Defined in node_modules/@types/node/stream/web.d.ts:248
- Defined in node_modules/@types/node/stream/web.d.ts:257

#####
Index

### Properties

closed
desiredSize
ready

### Methods

abort
close
releaseLock
write

## Properties

### `Readonly` closed

closed: Promise<undefined>

- Defined in node_modules/@types/node/stream/web.d.ts:249

### `Readonly` desiredSize

desiredSize: null | number

- Defined in node_modules/@types/node/stream/web.d.ts:250

### `Readonly` ready

ready: Promise<undefined>

- Defined in node_modules/@types/node/stream/web.d.ts:251

## Methods

### abort

- abort(reason?): Promise<void>

- #### Parameters

  - `Optional` reason: any

  #### Returns Promise<void>

  - Defined in node_modules/@types/node/stream/web.d.ts:252

### close

- close(): Promise<void>

- #### Returns Promise<void>

  - Defined in node_modules/@types/node/stream/web.d.ts:253

### releaseLock

- releaseLock(): void

- #### Returns void

  - Defined in node_modules/@types/node/stream/web.d.ts:254

### write

- write(chunk?): Promise<void>

- #### Parameters

  - `Optional` chunk: W

  #### Returns Promise<void>

  - Defined in node_modules/@types/node/stream/web.d.ts:255