Deprecate generator transforms?
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Refactoring
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- javascript
- Ambito
- tooling
Direzione di ricerca
Start with the Generators.filter and Generators.map entries linked from the README, then inspect their iterator and promise behavior against the three concerns described. Done requires a maintainer decision on deprecation versus redesign and a clearly scoped follow-up, since the issue does not select an implementation path.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
We currently provide two utility methods for creating a new Generator from an iterator: Generators.filter and Generators.map. There are a few problems with these methods:
-
If the input iterator is a Generator, the returned Generator does not wrap generator.return and generator.throw. Possibly, these methods should return an Iterator rather than a Generator, and be moved to Iterators.filter and Iterators.map. Or, these methods could “upgrade” an iterator to a generator, and wrap the return and throw methods as expected.
-
If the input iterator iterates over promises, the generator doesn’t wait for the promise to resolve. Coming from Observable, we somewhat expect the test or transform functions to be passed resolved values rather than Promise objects. However, in the case of Generators.filter, it’s not clear how that should work, since the test function might return false for the last promise, but it’s too late because the generator has already yielded a promise!
-
If the input iterator is an async iterator (i.e., iterator.next returns a Promise), these methods don’t work at all.
It’s possible that the simplest thing to do would be to deprecate these methods along with the deprecated DOM methods #31. I haven’t found them especially useful, and given the desire to keep the standard library small, it might be good to prune them.
- Lingua principale
- JavaScript
- Stelle
- 1k
- Fork
- 87
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi 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.
Altre issue di observablehq/stdlib
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 48/100
observablehq/stdlib#397 · 1 commento ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
observablehq/stdlib#384 · 2 commenti ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
observablehq/stdlib#379 · 1 commento ·
-
enhancement
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
observablehq/stdlib#378 · 2 commenti · 2 reazioni ·
-
issue with DuckDB parsingAperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
observablehq/stdlib#371 ·
Tutte le issue di observablehq/stdlib
Issue simili
-
internal os specific
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
frostney/GocciaScript#1688 ·
I maintainer di solito rispondono entro 1 giorno
-
🐞 bug pending triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
CircuitVerse/CircuitVerse#8031 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
I maintainer di solito rispondono entro 8 giorni
-
docs(stream-protocol): document messageMetatadata on start/finish and the message-metadata chunkForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertafactory-active task-identify-harness-labels-done task-identify-issue-type-done
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
vercel/ai#23375 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 7 giorni