-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
deno lsp, deno-ts: Property 'postMessage' does not exist on type 'Window & typeof globalThis'.deno-ts(2339) #9696
Comments
Related to #8219 and others. We need workspace folders and a config flag that indicates that files are worker scripts. |
What about |
@Mesteery those currently work. If you have issues with them being available it is not related to this feature request. I would open a new issue in vscode_deno with reproduction information. |
Yes they work but not when accessed from error: TS2339 [ERROR]: Property 'ByteLengthQueuingStrategy' does not exist on type 'typeof globalThis'.
globalThis.ByteLengthQueuingStrategy |
Is there a workaround to this? |
Also wondering. Is there a way to flag a file as being a worker? |
Similar
|
My workaround is to do this. |
You could ignore the line // @ts-ignore: lack of types in deno
self.onmessage = (e: MessageEvent) => {} |
|
Using deno canary, latest stable vscode and vscode-deno ext.
Don't know who produce this problem but i'm trying to solve the problem that some type definitions aren't available in webworkers:
Create a file called
a.ts
Create a file called
b.ts
deno run
a.ts
works - with no errors, but hovering over postMessage gives:Property 'postMessage' does not exist on type 'Window & typeof globalThis'.deno-ts(2339)
Trying to solve this with a tripple slash directive at the top of the file:
but `deno run` now gives the following errors:
The text was updated successfully, but these errors were encountered: