Streams: use Web IDL `async_sequence` in `ReadableStream.from`
まだ誰も着手していません。
- 主要言語
- JavaScript
- スター
- 122k
- フォーク
- 37.3k
- 平均マージ
- 4日 2時間
- マージ済み PR(30日)
- 283
説明
We are updating the Streams specification to use Web IDL's async_sequence<T> type for the input of ReadableStream.from(). The new IDL is:
interface ReadableStream {
static ReadableStream from(async_sequence<any> asyncIterable);
}
This comes with one behavioral change: ReadableStream.from("abc") used to iterate over the Unicode code points of the string (per String.prototype[Symbol.iterator]), but this will now throw a TypeError instead. The WPT tests have been updated to reflect this.
Specification change: https://github.com/whatwg/streams/pull/1372
Tests: https://github.com/web-platform-tests/wpt/pull/59594
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
ReadableStream.from() のエントリーポイントから始め、PR 1372 のリンクされた Streams 仕様の変更を読んでください。PR 59594 の更新された WPT カバレッジを比較し、async_sequence 入力が機能すること、および "abc" を渡すとコードポイントを反復処理するのではなく TypeError が生成されることを確認してください。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript, node.js
- 領域
- backend
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 55/100