-
Notifications
You must be signed in to change notification settings - Fork 12.8k
new URL() does not take URL object as base parameter #15246
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
Comments
The WG definition clearly defines this as a string https://url.spec.whatwg.org/#constructors , so the ability to pass a URL is just an implicit string conversion. Not sure why MDN documents this as if it's a different constructor. |
... but the spec also shows an implicit string conversion as an example usage, so we should play along |
Yeah, you are right. It seems to accept |
PRs welcomed. You can find more information about contributing lib.d.ts fixes at https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md#contributing-libdts-fixes. |
microsoft/TypeScript-DOM-lib-generator#332 has been merged and the update has been incorporated in this repository per https://github.com/Microsoft/TypeScript/blob/f2a1a428ea99ace495a8ca769b0a7c857ea6486a/lib/lib.dom.d.ts#L14860 |
I think this can be closed now? It looks like the latest Line 16070 in a03227d
|
TypeScript Version: 2.3.0
Code
Expected behavior:
Should compile
Actual behavior:
Reference: https://developer.mozilla.org/en-US/docs/Web/API/URL/URL
The text was updated successfully, but these errors were encountered: