Skip to content
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

feat: add serviceworker and sharedworker libs #997

Closed
wants to merge 2 commits into from

Conversation

saschanaz
Copy link
Contributor

@saschanaz saschanaz commented Mar 28, 2021

Closes #675, closes #505

@saschanaz saschanaz requested a review from sandersn as a code owner March 28, 2021 01:14
@HolgerJeromin
Copy link
Contributor

CC @jakearchibald and @MattiasBuelens

outputFolder,
});
emitFlavor(webidl, new Set(knownTypes.Worker), {
name: "webworker",
flavor: Flavor.Worker,
global: "Worker",
global: ["Worker", "DedicatedWorker", "SharedWorker", "ServiceWorker"],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we have a new dedicatedworker flavor that only contains ["DedicatedWorker", "Worker"]? It would be nice if you're writing code for a dedicated worker to have the type checker disallow using service worker-only or shared worker-only APIs. But I can also understand that it may be difficult to teach users the difference between the "webworker" and "dedicatedworker" flavors.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good to me and it was my initial plan. In the ideal world we could ultimately deprecate webworker in that case. I wonder what the maintainers think.

@saschanaz
Copy link
Contributor Author

Replaced by #1034

@saschanaz saschanaz closed this Jul 2, 2021
@saschanaz saschanaz deleted the microsoft-workers branch July 2, 2021 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to define a .js file as ServiceWorkerGlobalScope Create ServiceWorker lib
3 participants