-
Notifications
You must be signed in to change notification settings - Fork 440
add URL typing to webworker #223
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
Conversation
URL is also available in workder. <https://url.spec.whatwg.org/#idl-index>
@VincentBel, It will cover your contributions to all Microsoft-managed open source projects. |
@vincentbel, thanks for signing the contribution license agreement. We will now validate the agreement and then the pull request. |
baselines/dom.generated.d.ts
Outdated
@@ -13858,6 +13859,25 @@ interface ImageBitmap { | |||
close(): void; | |||
} | |||
|
|||
interface URL { |
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.
interface URL
is already defined in this file. no need to redefine it.
baselines/webworker.generated.d.ts
Outdated
@@ -1484,6 +1486,25 @@ interface ImageBitmap { | |||
close(): void; | |||
} | |||
|
|||
interface URL { |
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.
just edit inputfiles\knownWorkerInterfaces.json
to add URL
and URLSearcParams
.
@mhegazy updated. But ci is still failing. I have see some other PRs, and they seems failed with the same error. |
@@ -91,11 +91,13 @@ | |||
"SyncEventInit", | |||
"SyncManager", | |||
"USVString", | |||
"URL", | |||
"URLSearchParams", |
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.
looks like you need ObjectURLOptions
as well
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.
Added.
thanks! |
URL
is also available in worker. (URL IDL spec). Fix microsoft/TypeScript#14878.Questions:
URL
tying is already defined ininputfiles/browser.webidl.xml#L11367-L11395
, so it is only need to added toworker
. So I added"flavor": "Worker"
, but it seems doesn't work.(same as"flavor": "All"
forURLSearchParams
) 😅URL
andURLSearchParams
should be added toWorkerGlobalScope
. It is signed asExposed=(Window,Worker)
in the spec IDLUSVString
, but I usestring
here (keep it same as previous addedURLSearchParams
typing). Doesn't it matters?Updates:
URL
andURLSearcParams
toknownWorkerInterfaces.json
.URL
andURLSearchParams
shouldn't be added toWorkerGlobalScope
.(The same as fetch related typing)