microsoft / microsoft/TypeScript

Transpilation of iterable spread is incorrect for non-iterable values.

Aperta
#43,353 4 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@rbuckton ci sta già lavorando.

Dal 23/3/2021.

Needs Investigation
Lingua principale
Go
Stelle
111k
Fork
14.3k
Merge medio
2g 4h
PR unite (30g)
132

Descrizione

Bug Report

🔎 Search Terms

transpilation __spreadArray spread iterable

🕗 Version & Regression Information
  • This changed between versions 4.1 and 4.2, but was broken in a different way in 4.1
⏯ Playground Link

https://www.typescriptlang.org/play?target=1&ts=4.2.3#code/MYewdgziA2CmB00QHMAUBteWCMBdAlANxA

💻 Code
console.log([...1]);
🙁 Actual behavior

print []

🙂 Expected behavior

Throw a runtime exception. 1 is not an iterable.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.