---
hide_title: false
hide_table_of_contents: false
pagination_next: null
pagination_prev: null
---
# WritableStreamDefaultWriter()

The **`WritableStreamDefaultWriter()`**
constructor creates a new `WritableStreamDefaultWriter` object instance.

## Syntax

```js
new WritableStreamDefaultWriter(stream)
```

### Parameters

- `stream`
  - : The `WritableStream` to be written to.

### Return value

An instance of the `WritableStreamDefaultWriter` object.

### Exceptions

- `TypeError`
  - : The provided `stream` value is not a `WritableStream`, or it
    is locked to another writer already.
