MCPcopy Create free account
hub / github.com/di-sukharev/opencommit / close

Method close

out/cli.cjs:11245–11257  ·  view source on GitHub ↗

* Closes the controlled readable stream. Consumers will still be able to read any previously-enqueued chunks from * the stream, but once those are read, the stream will become closed.

()

Source from the content-addressed store, hash-verified

11243 * the stream, but once those are read, the stream will become closed.
11244 */
11245 close() {
11246 if (!IsReadableByteStreamController(this)) {
11247 throw byteStreamControllerBrandCheckException("close");
11248 }
11249 if (this._closeRequested) {
11250 throw new TypeError("The stream has already been closed; do not close it again!");
11251 }
11252 const state2 = this._controlledReadableByteStream._state;
11253 if (state2 !== "readable") {
11254 throw new TypeError(`The stream (in ${state2} state) is not in the readable state and cannot be closed`);
11255 }
11256 ReadableByteStreamControllerClose(this);
11257 }
11258 enqueue(chunk) {
11259 if (!IsReadableByteStreamController(this)) {
11260 throw byteStreamControllerBrandCheckException("enqueue");

Callers

nothing calls this directly

Tested by

no test coverage detected