MCPcopy
hub / github.com/di-sukharev/opencommit / constructor

Method constructor

out/cli.cjs:12121–12137  ·  view source on GitHub ↗
(rawUnderlyingSink = {}, rawStrategy = {})

Source from the content-addressed store, hash-verified

12119 }
12120 class WritableStream2 {
12121 constructor(rawUnderlyingSink = {}, rawStrategy = {}) {
12122 if (rawUnderlyingSink === void 0) {
12123 rawUnderlyingSink = null;
12124 } else {
12125 assertObject(rawUnderlyingSink, "First parameter");
12126 }
12127 const strategy = convertQueuingStrategy(rawStrategy, "Second parameter");
12128 const underlyingSink = convertUnderlyingSink(rawUnderlyingSink, "First parameter");
12129 InitializeWritableStream(this);
12130 const type2 = underlyingSink.type;
12131 if (type2 !== void 0) {
12132 throw new RangeError("Invalid type is specified");
12133 }
12134 const sizeAlgorithm = ExtractSizeAlgorithm(strategy);
12135 const highWaterMark = ExtractHighWaterMark(strategy, 1);
12136 SetUpWritableStreamDefaultControllerFromUnderlyingSink(this, underlyingSink, highWaterMark, sizeAlgorithm);
12137 }
12138 /**
12139 * Returns whether or not the writable stream is locked to a writer.
12140 */

Callers

nothing calls this directly

Calls 7

assertObjectFunction · 0.85
convertQueuingStrategyFunction · 0.85
convertUnderlyingSinkFunction · 0.85
InitializeWritableStreamFunction · 0.85
ExtractSizeAlgorithmFunction · 0.85
ExtractHighWaterMarkFunction · 0.85

Tested by

no test coverage detected