oven-sh / bun

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
https://bun.sh
Other
73.81k stars 2.73k forks source link

Headers.entries() "doesn't exist" #13785

Open aryzing opened 1 month ago

aryzing commented 1 month ago

What version of Bun is running?

1.1.27

What platform is your computer?

Linux 6.2.0-36-generic x86_64 x86_64

What steps can reproduce the bug?

What is the expected behavior?

No type errors

What do you see instead?

Property 'entries' does not exist on type 'Headers'.

Additional information

image

Seems to work when removing "DOM",

{
  "compilerOptions": {
    // Enable latest features
-    "lib": ["ESNext", "DOM"],
+    "lib": ["ESNext"],
    "target": "ESNext",
    "module": "ESNext",
Jarred-Sumner commented 1 month ago

It exists, but it looks like there's a TypeScript types issue with this.