- Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptThe issue relates to the different libraries shipped with TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issueHelp WantedYou can do thisYou can do this
Milestone
Description
TypeScript Version: 2.2.2
according to https://url.spec.whatwg.org/#urlsearchparams
URLSearchParams is iterable, but it is not iterable in typescript now.
this code failed to compile but run successful as plain JavaScript in google chrome.
Code
// A *self-contained* demonstration of the problem follows... const params = new URLSearchParams() params.set('k', 'v') for(let [key, value] of params) { console.log(key, value) }
Expected behavior:
compile successfully
Actual behavior:
error TS2488: Type must have a 'Symbol.iterator' method that returns an iterator.
saschanaz and AskYous
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptThe issue relates to the different libraries shipped with TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issueHelp WantedYou can do thisYou can do this