Repository navigation
add URL typing to webworker - #223
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. |
|
Vincent Bel (@vincentbel), thanks for signing the contribution license agreement. We will now validate the agreement and then the pull request. |
| close(): void; | ||
| } | ||
|
|
||
| interface URL { |
There was a problem hiding this comment.
interface URL is already defined in this file. no need to redefine it.
| close(): void; | ||
| } | ||
|
|
||
| interface URL { |
There was a problem hiding this comment.
just edit inputfiles\knownWorkerInterfaces.json to add URL and URLSearcParams.
|
Mohamed Hegazy (@mhegazy) updated. But ci is still failing. I have see some other PRs, and they seems failed with the same error. |
| "SyncManager", | ||
| "USVString", | ||
| "URL", | ||
| "URLSearchParams", |
There was a problem hiding this comment.
looks like you need ObjectURLOptions as well
There was a problem hiding this comment.
Added.
|
thanks! |
URLis also available in worker. (URL IDL spec). Fix microsoft/TypeScript#14878.Questions:
URLtying 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) 😅URLandURLSearchParamsshould be added toWorkerGlobalScope. It is signed asExposed=(Window,Worker)in the spec IDLUSVString, but I usestringhere (keep it same as previous addedURLSearchParamstyping). Doesn't it matters?Updates:
URLandURLSearcParamstoknownWorkerInterfaces.json.URLandURLSearchParamsshouldn't be added toWorkerGlobalScope.(The same as fetch related typing)