SharedWorker constructor does not accept URL #43689
Labels
Bug
A bug in TypeScript
Domain: lib.d.ts
The issue relates to the different libraries shipped with TypeScript
Help Wanted
You can do this
Milestone
Bug Report
π Search Terms
SharedWorker constructor, Worker URL
β― Playground Link
Playground link with relevant code
π» Code
π Actual behavior
SharedWorker constructor only accepts string but not URL.
π 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.
The text was updated successfully, but these errors were encountered: