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

Method respondWithNewView

out/cli.cjs:11188–11203  ·  view source on GitHub ↗
(view)

Source from the content-addressed store, hash-verified

11186 ReadableByteStreamControllerRespond(this._associatedReadableByteStreamController, bytesWritten);
11187 }
11188 respondWithNewView(view) {
11189 if (!IsReadableStreamBYOBRequest(this)) {
11190 throw byobRequestBrandCheckException("respondWithNewView");
11191 }
11192 assertRequiredArgument(view, 1, "respondWithNewView");
11193 if (!ArrayBuffer.isView(view)) {
11194 throw new TypeError("You can only respond with array buffer views");
11195 }
11196 if (this._associatedReadableByteStreamController === void 0) {
11197 throw new TypeError("This BYOB request has been invalidated");
11198 }
11199 if (IsDetachedBuffer(view.buffer)) {
11200 throw new TypeError("The given view's buffer has been detached and so cannot be used as a response");
11201 }
11202 ReadableByteStreamControllerRespondWithNewView(this._associatedReadableByteStreamController, view);
11203 }
11204 }
11205 Object.defineProperties(ReadableStreamBYOBRequest2.prototype, {
11206 respond: { enumerable: true },

Callers

nothing calls this directly

Tested by

no test coverage detected