You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error TS2769: No overload matches this call.
Overload 1 of 2, '(message: any, targetOrigin: string, transfer?: Transferable[] | undefined): void', gave the following error.
Argument of type 'ArrayBuffer[]' is not assignable to parameter of type 'string'.
Overload 2 of 2, '(message: any, options?: WindowPostMessageOptions | undefined): void', gave the following error.
Type 'ArrayBuffer[]' has no properties in common with type 'WindowPostMessageOptions'.
self.postMessage(test, [test]);
Typescript Version: 5.6.3
The text was updated successfully, but these errors were encountered:
Are you suggesting I create a tsconfig that targets the webworkers lib to compile the workers separately from the current project's tsconfig that specifically targets es6? With excludes and includes set with *.worker.* (arbitrary) file naming conventions to separate compilation processes?
If so, that's double the -watch instances on top of the configs. Just to prevent TS from throwing a bad error message.
That's probably the way for now, because otherwise there's no way to tell the worker file to not use the same context with other files. Having a way to tell the compiler that "hey this file is a single file worker, give it its own context, thank you" with an inline way, but I don't think that exists. cc @sandersn to confirm
Main:
Worker:
Erroneous Compilation Error:
Typescript Version: 5.6.3
The text was updated successfully, but these errors were encountered: