Skip to content

Worker constructor does not accept URL #28397

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
TimvdLippe opened this issue Nov 7, 2018 · 2 comments
Closed

Worker constructor does not accept URL #28397

TimvdLippe opened this issue Nov 7, 2018 · 2 comments
Assignees
Labels
Bug A bug in TypeScript Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript

Comments

@TimvdLippe
Copy link
Contributor

TypeScript Version: 3.2.0-dev.201xxxxx

Search Terms: worker new url, worker constructor

Code

new Worker(new URL(""))

Expected behavior: Compiles fine, as it is valid per the spec

Actual behavior:

[ts] Argument of type 'URL' is not assignable to parameter of type 'string'.

Playground Link: http://www.typescriptlang.org/play/#src=new%20Worker(new%20URL(%22%22))%3B

Related Issues: #15338, #15246 and was recently updated in #28136 as well

@weswigham weswigham added Bug A bug in TypeScript Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript labels Nov 7, 2018
@weswigham
Copy link
Member

PRs welcomed. You can find more information about contributing lib.d.ts fixes at https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md#contributing-libdts-fixes.

@TimvdLippe
Copy link
Contributor Author

PR is up at microsoft/TypeScript-DOM-lib-generator#600

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript
Projects
None yet
Development

No branches or pull requests

4 participants