(rawUnderlyingSource = {}, rawStrategy = {})
| 13932 | } |
| 13933 | class ReadableStream7 { |
| 13934 | constructor(rawUnderlyingSource = {}, rawStrategy = {}) { |
| 13935 | if (rawUnderlyingSource === void 0) { |
| 13936 | rawUnderlyingSource = null; |
| 13937 | } else { |
| 13938 | assertObject(rawUnderlyingSource, "First parameter"); |
| 13939 | } |
| 13940 | const strategy = convertQueuingStrategy(rawStrategy, "Second parameter"); |
| 13941 | const underlyingSource = convertUnderlyingDefaultOrByteSource(rawUnderlyingSource, "First parameter"); |
| 13942 | InitializeReadableStream(this); |
| 13943 | if (underlyingSource.type === "bytes") { |
| 13944 | if (strategy.size !== void 0) { |
| 13945 | throw new RangeError("The strategy for a byte stream cannot have a size function"); |
| 13946 | } |
| 13947 | const highWaterMark = ExtractHighWaterMark(strategy, 0); |
| 13948 | SetUpReadableByteStreamControllerFromUnderlyingSource(this, underlyingSource, highWaterMark); |
| 13949 | } else { |
| 13950 | const sizeAlgorithm = ExtractSizeAlgorithm(strategy); |
| 13951 | const highWaterMark = ExtractHighWaterMark(strategy, 1); |
| 13952 | SetUpReadableStreamDefaultControllerFromUnderlyingSource(this, underlyingSource, highWaterMark, sizeAlgorithm); |
| 13953 | } |
| 13954 | } |
| 13955 | /** |
| 13956 | * Whether or not the readable stream is locked to a {@link ReadableStreamDefaultReader | reader}. |
| 13957 | */ |
nothing calls this directly
no test coverage detected