oven-sh/bun

Async generator function are not properly identified in console.log

Open

#18 324 ouverte le 20 mars 2025

Voir sur GitHub
 (3 commentaires) (0 réactions) (0 assignés)Rust (4 486 forks)batch import
bugconsolegood first issue

Métriques du dépôt

Stars
 (90 348 stars)
Métriques de merge PR
 (Merge moyen 1j 17h) (357 PRs mergées en 30 j)

Description

What version of Bun is running?

1.2.6-canary.74+74768449b

What platform is your computer?

Microsoft Windows NT 10.0.19045.0 x64

What steps can reproduce the bug?

async function* arrayToIter(requests) {
  for (const request of requests) {
    yield await Promise.resolve(request);
  }
}
console.log(arrayToIter([]));

What is the expected behavior?

Node Object [AsyncGenerator] {}

What do you see instead?

Bun {}

Additional information

No response

Guide contributeur