ReadableStream.from() method?
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 42/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- typescript
- Domain
- api
Research direction
Start by checking the TypeScript playground example and compare the requested ReadableStream.from() API with the linked WHATWG Streams specification and MDN documentation. Done means the generated DOM declarations expose the static method consistently with the supported WebIDL API, with the result verified against the reported TypeScript example.
Written by the indexing model from the issue text.
Description
Hi, first of all, thanks for your work on these type declarations, they are invaluable for working with web standards APIs.
It seems as if the following is not yet supported in TS 5.3.3 (also fails in Beta and Nightly):
ReadableStream.from(['a', 'b']);
// ^^^^? Property 'from' does not exist on type '{
// new (body?: BodyInit | null | undefined, init?: ResponseInit | undefined): Response;
// prototype: Response;
// error(): Response;
// json(data: any, init?: ResponseInit | undefined): Response;
// redirect(url: string | URL, status?: number | undefined): Response;
// }'.
- Playground: https://www.typescriptlang.org/play?ts=5.3.3#code/PTAEAsBdIBwZwFwgCYFMBuqA2B7GqAnAOgFscAvASyywEMicCBzYVAOwFoBVAZWGRwBjOMADqqAEbAAggAUAksABKqWsloSsqHpAKqSwAGYEcJAPpxItSJUEAoEBGjwkwS3tok4ROPkFEAd3BrAKYGZmAAYgI4DhgTSBxIAE98OxVfHDY4VCJjUwAKAG0AcloSgBpQEokSgF0ASgBuOyA
- WhatWG Streams Spec https://streams.spec.whatwg.org/#rs-prototype
- MDN ReadableStream: from() static method (experimental) https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/from_static
Maybe a similar PR is needed to update the types to the WebIDL Streams spec like @MattiasBuelens did in 2020 in https://github.com/microsoft/TypeScript-DOM-lib-generator/pull/890?
Or is this not supported yet because only 3 runtimes (Firefox, Deno and Node.js) support this?
I can also re-submit this in https://github.com/microsoft/typescript if that makes more sense.
- Dominant language
- TypeScript
- Stars
- 740
- Forks
- 474
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 15
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/TypeScript-DOM-lib-generator
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
microsoft/TypeScript-DOM-lib-generator#2554 · 6 comments ·
-
lib.d.ts bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
lib.d.ts bug
Difficulty 1/5 Under an hour Newbie friendliness 68/100
microsoft/TypeScript-DOM-lib-generator#2154 · 1 reaction ·
-
lib.d.ts bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
microsoft/TypeScript-DOM-lib-generator#2107 · 5 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
microsoft/TypeScript-DOM-lib-generator#1675 · 2 comments · 1 reaction ·
All issues in microsoft/TypeScript-DOM-lib-generator
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
bug v2
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
modelcontextprotocol/inspector#2458 · 1 comment ·
-
Difficulty 1/5 Under an hour Newbie friendliness 75/100
railmapgen/rmp-gallery#4068 ·
-
Mend: dependency security vulnerability status: needs triage 🕵️♀️
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
carbon-design-system/ibm-products#9907 ·