Microsoft/TypeScript

URLSearchParams needs size

Open

#54,466 建立於 2023年5月31日

在 GitHub 查看
 (3 留言) (8 反應) (0 負責人)TypeScript (6,726 fork)batch import
BugDomain: lib.d.tsHelp Wanted

倉庫指標

Star
 (48,455 star)
PR 合併指標
 (平均合併 6天 17小時) (30 天內合併 9 個 PR)

描述

Bug Report

🔎 Search Terms

URLSearchParams

🕗 Version & Regression Information

TypeScript Version: typescript@4.9.5

  • This is a crash
  • This is the behavior in every version I tried, and I reviewed the FAQ for entries about URLSearchParams.size

⏯ Playground Link

Playground link with relevant code

💻 Code

console.log(new URLSearchParams().size)

🙁 Actual behavior

Property 'size' does not exist on type 'URLSearchParams'.ts(2339)

🙂 Expected behavior

No error

Related bug:

https://github.com/microsoft/TypeScript/issues/38139

Note: Adding { "lib": ["dom.iterable"] } to my compilerOptions does not help.

貢獻者指南