Closed
Description
Bug Report
π Search Terms
SharedWorker constructor, Worker URL
β― Playground Link
Playground link with relevant code
π» Code
new SharedWorker(new URL(""));
π Actual behavior
SharedWorker constructor only accepts string but not URL.
[ts] Argument of type 'URL' is not assignable to parameter of type 'string'.
π Expected behavior
SharedWorker constructor should accept string or URL like Worker 28397
Since webpack changed its supported syntax for Worker initialization to pass a URL, which also applies to SharedWorker, this missing type became more relevant.