Description
TypeScript Version: 3.1.3 (not fixed in master
as well)
https://github.com/Microsoft/TypeScript/blob/release-3.1/lib/lib.webworker.d.ts#L2699
Search Terms:
web worker options
Code
new Worker('https://some-url', {type: 'module'})
Expected behavior:
Type check should pass.
Actual behavior:
Second (options) parameter isn't specified in Worker types, so type check fails.
Playground Link:
http://www.typescriptlang.org/play/#src=new%20Worker('https%3A%2F%2Fsome-url'%2C%20%7Btype%3A%20'module'%7D)
Related Issues:
Couldn't find existing issue discussing this.
Reference:
https://developer.mozilla.org/en-US/docs/Web/API/Worker/Worker