* @param {any} [chunk] * @returns {Promise }
(chunk = undefined)
| 476 | * @returns {Promise<void>} |
| 477 | */ |
| 478 | write(chunk = undefined) { |
| 479 | if (!isWritableStreamDefaultWriter(this)) |
| 480 | return PromiseReject(new ERR_INVALID_THIS('WritableStreamDefaultWriter')); |
| 481 | if (this[kState].stream === undefined) { |
| 482 | return PromiseReject( |
| 483 | new ERR_INVALID_STATE.TypeError( |
| 484 | 'Writer is not bound to a WritableStream')); |
| 485 | } |
| 486 | return writableStreamDefaultWriterWrite(this, chunk); |
| 487 | } |
| 488 | |
| 489 | [kInspect](depth, options) { |
| 490 | return customInspect(depth, options, this[kType], { |
nothing calls this directly
no test coverage detected