Lusito/webextension-polyfill-ts

runtime.connect only accepts two arguments

arty-name opened this issue · 2 comments

According to the MDN docs for runtime.connect the first parameter extensionId is optional, and there is even an example of calling this function with the "second" parameter only:

var myPort = browser.runtime.connect({name:"port-from-cs"});

The current types however prevent omitting the first parameter while providing the second one (Argument of type '{ name: string; }' is not assignable to parameter of type 'string'.). Could you please change that?

Thanks for the report. Fixed in 0.26.0.

Thanks!