Skip to content

URLSearchParams constructor argument should be string | object #15338

Closed
microsoft/TypeScript-DOM-lib-generator
#450
@saschanaz

Description

@saschanaz

TypeScript Version: 2.2.1 / nightly (2.2.0-dev.201xxxxx)

Code

By the spec:

let params = new URLSearchParams({key: "730d67"})
params.toString() // "key=730d67"

Expected behavior:

The example should work.

Actual behavior:

Error: Argument of type '{ key: string }' is not assignable to parameter of type 'string | URLSearchParams`

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptHelp WantedYou can do this

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions