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

Unable to define a .js file as ServiceWorkerGlobalScope #675

Closed
wilsonpage opened this issue Apr 5, 2019 · 2 comments
Closed

Unable to define a .js file as ServiceWorkerGlobalScope #675

wilsonpage opened this issue Apr 5, 2019 · 2 comments

Comments

@wilsonpage
Copy link

When a .js file is a service-worker, there's no way to define its scope/self/this as ServiceWorkerGlobalScope. This means service-worker only global APIs like self.skipWaiting() are undefined and fail Typescript's checkjs run.

Minimal test-case

https://github.com/wilsonpage/vscode-scope-test-case

Twitter thread w/ @DanielRosenwasser

https://twitter.com/drosenwasser/status/1113905694028132352

@saschanaz
Copy link
Contributor

#1034 added serviceworker lib and is available on TS 4.4

@github-actions close

@github-actions
Copy link
Contributor

Closing because @saschanaz is one of the code-owners of this repository.

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 a pull request may close this issue.

2 participants