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

Method close

lib/internal/webstreams/readablestream.js:1241–1249  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1239 }
1240
1241 close() {
1242 if (!isReadableByteStreamController(this))
1243 throw new ERR_INVALID_THIS('ReadableByteStreamController');
1244 if (this[kState].closeRequested)
1245 throw new ERR_INVALID_STATE.TypeError('Controller is already closed');
1246 if (this[kState].stream[kState].state !== 'readable')
1247 throw new ERR_INVALID_STATE.TypeError('ReadableStream is already closed');
1248 readableByteStreamControllerClose(this);
1249 }
1250
1251 /**
1252 * @param {ArrayBufferView} chunk

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected