* @param {any} [reason] * @returns {Promise }
(reason = undefined)
| 967 | * @returns {Promise<void>} |
| 968 | */ |
| 969 | cancel(reason = undefined) { |
| 970 | if (!isReadableStreamDefaultReader(this)) |
| 971 | return PromiseReject(new ERR_INVALID_THIS('ReadableStreamDefaultReader')); |
| 972 | if (this[kState].stream === undefined) { |
| 973 | return PromiseReject(new ERR_INVALID_STATE.TypeError( |
| 974 | 'The reader is not attached to a stream')); |
| 975 | } |
| 976 | return readableStreamReaderGenericCancel(this, reason); |
| 977 | } |
| 978 | |
| 979 | [kInspect](depth, options) { |
| 980 | return customInspect(depth, options, this[kType], { |
nothing calls this directly
no test coverage detected