@throwTypeError("underlyingSink.write should be a function"); } if ("close" in underlyingSink) { underlyingSinkDict["close"] = underlyingSink["close"]; if (typeof underlyingSinkDict["close"] !== "function") @throwTypeError("underlyingSink.close should be a function"); } if ("abort" in underlyingSink) { underlyingSinkDict["abort"] = underlyingSink["abort"]; if (typeof underlyingSinkDict["abort"] !== "function") @throwTypeError("underlyingSink.abort should be a function"); } @initializeWritableStreamSlots(stream, underlyingSink); @setUpWritableStreamDefaultControllerFromUnderlyingSink(stream, underlyingSink, underlyingSinkDict, highWaterMark, sizeAlgorithm); return stream; })