-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptThe issue relates to the different libraries shipped with TypeScriptHelp WantedYou can do thisYou can do this
Milestone
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.
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptThe issue relates to the different libraries shipped with TypeScriptHelp WantedYou can do thisYou can do this