# 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: number;
ready: Promise<undefined>;
abort(reason?: any): Promise<void>;
close(): Promise<void>;
releaseLock(): void;
write(chunk?: W): Promise<void>;
}

#### Type Parameters

- W = any

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

#####
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:301

### `Readonly` desiredSize

desiredSize: number

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

### `Readonly` ready

ready: Promise<undefined>

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

##
Methods

### abort

- abort(reason?): Promise<void>

- #### Parameters

  - `Optional` reason: any

  #### Returns Promise<void>

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

### close

- close(): Promise<void>

- #### Returns Promise<void>

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

### releaseLock

- releaseLock(): void

- #### Returns void

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

### write

- write(chunk?): Promise<void>

- #### Parameters

  - `Optional` chunk: W

  #### Returns Promise<void>

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