MCPcopy Index your code
hub / github.com/di-sukharev/opencommit / close

Method close

out/cli.cjs:12525–12537  ·  view source on GitHub ↗

* If the reader is active, behaves the same as WritableStream.close | stream.close().

()

Source from the content-addressed store, hash-verified

12523 * If the reader is active, behaves the same as {@link WritableStream.close | stream.close()}.
12524 */
12525 close() {
12526 if (!IsWritableStreamDefaultWriter(this)) {
12527 return promiseRejectedWith(defaultWriterBrandCheckException("close"));
12528 }
12529 const stream4 = this._ownerWritableStream;
12530 if (stream4 === void 0) {
12531 return promiseRejectedWith(defaultWriterLockException("close"));
12532 }
12533 if (WritableStreamCloseQueuedOrInFlight(stream4)) {
12534 return promiseRejectedWith(new TypeError("Cannot close an already-closing stream"));
12535 }
12536 return WritableStreamDefaultWriterClose(this);
12537 }
12538 /**
12539 * Releases the writer’s lock on the corresponding stream. After the lock is released, the writer is no longer active.
12540 * If the associated stream is errored when the lock is released, the writer will appear errored in the same way from

Callers

nothing calls this directly

Tested by

no test coverage detected