oven-sh / bun

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

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

Open aryzing opened 2 months ago

aryzing commented 2 months 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 2 months ago

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