Closed
Description
Webworkers have a global "postMessage(message:any):void" method, but TS uses the "postMessage(message:any, origin:string, ports?:any):void" definition from window.postMessage.
This causes something like
postMessage("Hello");
to be detected as an error, even though it is valid from inside a webworker. Maybe there needs to be a way to indicate to TS (via a comment in the file?) that the current script is intended to be loaded inside a webworker.