MCPcopy Index your code
hub / github.com/nodejs/node / abort

Method abort

lib/internal/webstreams/writablestream.js:252–260  ·  view source on GitHub ↗

* @param {any} [reason] * @returns {Promise }

(reason = undefined)

Source from the content-addressed store, hash-verified

250 * @returns {Promise<void>}
251 */
252 abort(reason = undefined) {
253 if (!isWritableStream(this))
254 return PromiseReject(new ERR_INVALID_THIS('WritableStream'));
255 if (isWritableStreamLocked(this)) {
256 return PromiseReject(
257 new ERR_INVALID_STATE.TypeError('WritableStream is locked'));
258 }
259 return writableStreamAbort(this, reason);
260 }
261
262 /**
263 * @returns {Promise<void>}

Callers

nothing calls this directly

Calls 3

isWritableStreamFunction · 0.85
isWritableStreamLockedFunction · 0.85
writableStreamAbortFunction · 0.85

Tested by

no test coverage detected