Skip to content

Incorrect casing: property "URL.searchparams" should be "URL.searchParams" #14399

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
JeffJacobson opened this issue Mar 1, 2017 · 3 comments
Closed
Assignees
Labels
Bug A bug in TypeScript Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript Fixed A PR has been merged for this issue

Comments

@JeffJacobson
Copy link

In lib.dom.d.ts, the searchparams property of the URL interface should be cased as searchParams according to MDN.

TypeScript Version: 2.2.1

Code

// A *self-contained* demonstration of the problem follows...
let pageUrl = new URL(location.href);
let url = pageUrl.searchParams.get("url");

Expected behavior:

Should compile successfully.

Actual behavior:

tsc returns an error when compiling.

src/index.ts(9,19): error TS2339: Property 'searchParams' does not exist on type 'URL'.
@mhegazy
Copy link
Contributor

mhegazy commented Mar 2, 2017

Should be fixed by microsoft/TypeScript-DOM-lib-generator#198

@mhegazy mhegazy added Bug A bug in TypeScript Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript Fixed in TSJS repo Fix merged in https://github.com/Microsoft/TSJS-lib-generator, but not ported yet labels Mar 2, 2017
@mhegazy mhegazy self-assigned this Mar 2, 2017
@mhegazy mhegazy added this to the TypeScript 2.3 milestone Mar 2, 2017
@ghost
Copy link

ghost commented Mar 22, 2017

i installed typescript@2.3.0-dev.20170322 via npm but it doesn't seem to have the change in it yet

it has today's date on it but not a change from 21 days ago

i hope this can be fixed soon

@mhegazy
Copy link
Contributor

mhegazy commented Mar 22, 2017

the fixes has not been ported to the main TS repo, pushed a PR to port them in #14805.

@mhegazy mhegazy added the Fixed A PR has been merged for this issue label Mar 22, 2017
@zhengbli zhengbli removed the Fixed in TSJS repo Fix merged in https://github.com/Microsoft/TSJS-lib-generator, but not ported yet label Mar 23, 2017
yeganemehr added a commit to jeyserver/webuilder-npm that referenced this issue Apr 12, 2017
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A bug in TypeScript Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript Fixed A PR has been merged for this issue
Projects
None yet
Development

No branches or pull requests

3 participants