-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
fix: add missing URL.canParse()
types
#20244
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@@ -22483,6 +22483,8 @@ interface URL { | |||
declare var URL: { | |||
prototype: URL; | |||
new(url: string | URL, base?: string | URL): URL; | |||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/canParse_static) */ | |||
canParse(url: string | URL, base?: string | URL): boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should add tests for both these changes because otherwise this will easily go away in the next TypeScript uprade since these files are generated by TypeScript.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I didn't know. I'll fix in another PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No problem. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please point me in the direction of the test that needs to be added?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's ok. It seems these types are in TypeScript now.
Reference: https://developer.mozilla.org/en-US/docs/Web/API/URL/canParse_static