Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

ReadableStream.from() method?

オープン
#1,691 コメント 3 件 リアクション 3 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
42/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
typescript
領域
api

調査の方向性

まず TypeScript playground example を確認し、要求された ReadableStream.from() API を、リンクされている WHATWG Streams specification および MDN documentation と比較します。生成された DOM declarations が、サポートされている WebIDL API と一貫した形で static method を公開し、報告された TypeScript example に対して結果が検証できれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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;
//                   }'.

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.

主要言語
TypeScript
スター
740
フォーク
474
平均マージ
2日 8時間
マージ済み PR(30日)
15

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

microsoft/TypeScript-DOM-lib-generator のほかの issue

microsoft/TypeScript-DOM-lib-generator の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。