oven-sh/bun

Async generator function are not properly identified in console.log

開放

#18,324 建立於 2025年3月20日

 (3 則留言) (0 個反應) (0 位負責人)Rust (4,486 個分叉)batch import
bugconsolegood first issue

倉庫指標

星標
 (90,348 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

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

貢獻者指南