Streams: use Web IDL `async_sequence` in `ReadableStream.from`
Nessuno ha ancora preso questa issue.
- Lingua principale
- JavaScript
- Stelle
- 122k
- Fork
- 37.3k
- Merge medio
- 4g 2h
- PR unite (30g)
- 283
Descrizione
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
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia dal punto di ingresso ReadableStream.from() e leggi la modifica collegata della specifica Streams in PR 1372. Confronta la copertura WPT aggiornata in PR 59594, quindi verifica che gli input async_sequence funzionino e che passare "abc" produca un TypeError invece di iterare sui relativi punti di codice.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript, node.js
- Ambito
- backend
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Tranquilla
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 55/100