* @param {any} [reason] * @returns {Promise }
(reason = undefined)
| 1104 | * @returns {Promise<void>} |
| 1105 | */ |
| 1106 | cancel(reason = undefined) { |
| 1107 | if (!isReadableStreamBYOBReader(this)) |
| 1108 | return PromiseReject(new ERR_INVALID_THIS('ReadableStreamBYOBReader')); |
| 1109 | if (this[kState].stream === undefined) { |
| 1110 | return PromiseReject(new ERR_INVALID_STATE.TypeError( |
| 1111 | 'The reader is not attached to a stream')); |
| 1112 | } |
| 1113 | return readableStreamReaderGenericCancel(this, reason); |
| 1114 | } |
| 1115 | |
| 1116 | [kInspect](depth, options) { |
| 1117 | return customInspect(depth, options, this[kType], { |
nothing calls this directly
no test coverage detected