Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm ci --legacy-peer-deps
- run: npm run test-node

test-browsers:
Expand All @@ -35,7 +35,7 @@ jobs:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
- name: Install dependencies
run: npm ci
run: npm ci --legacy-peer-deps

- name: Install Chrome
run: npx playwright install --with-deps chromium
Expand All @@ -52,9 +52,9 @@ jobs:
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
- run: npm ci
- run: npm ci --legacy-peer-deps
- run: npm run test-type-definitions
- run: npm i typescript@4.7 @types/node@18.0.0
- run: npm i typescript@4.7 @types/node@18.0.0 --legacy-peer-deps
- run: npm run test-type-definitions-legacy

lint:
Expand All @@ -66,5 +66,5 @@ jobs:
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
- run: npm ci
- run: npm ci --legacy-peer-deps
- run: npm run lint
10 changes: 9 additions & 1 deletion lib/types/dom.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ export namespace DOM {
*/
getWriter(): WritableStreamDefaultWriter<W>;
}
interface ReadableStreamBYOBReaderReadOptions {
min?: number;
}
/**
* The `ReadableStream` interface of the Streams API represents a readable stream of byte data.
*
Expand Down Expand Up @@ -126,7 +129,12 @@ export namespace DOM {
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/read)
*/
read<T extends ArrayBufferView>(view: T): Promise<globalThis.ReadableStreamReadResult<T>>;
read<T extends Exclude<BufferSource, ArrayBuffer>>(
view: T,
// `options` are included in TS v6 definitions but not in v5; to keep the types common
// we redeclare `ReadableStreamBYOBReaderReadOptions`
options?: ReadableStreamBYOBReaderReadOptions
): Promise<globalThis.ReadableStreamReadResult<T>>;
/**
* The **`releaseLock()`** method of the ReadableStreamBYOBReader interface releases the reader's lock on the stream.
*
Expand Down
Loading
Loading