webextension-polyfill-ts
webextension-polyfill-ts copied to clipboard
This is a TypeScript ready "wrapper" for the WebExtension browser API Polyfill by Mozilla
Hey, I would love to use `browser.runtime.sendMessage` the following way so that I can specify the type of the message that I am sending. ``` browser.runtime.sendMessage({ command: "log", logData, })...
`any` is inherently unsafe and hurts the boundary with your application code. Using unknown will require consumers to do type checks before using values which is what they should be...
Hi there, The `ExecutionWorld` type should also include `"MAIN"`. Can this be added to `@types/webextension-polyfill`? https://developer.chrome.com/docs/extensions/reference/scripting/#type-ExecutionWorld ```typescript await browser.scripting.executeScript({ target: { tabId }, // @ts-expect-error @types/webextension-polyfill are wrong world: 'MAIN',...
I'd like to suggest adding a json type in some places, to have more correct/helpful types to work with. Two places that immediately come to mind are `browser.runtime.onMessage` and `browser.storage..get`....
Some of the apis in the schema are partly supported. How about using [browser-compat-data](https://github.com/mdn/browser-compat-data/tree/master/webextensions/api) to make them optional?
This type is missing. It's in the @types/chrome package. 
This indicates that the extension was installed because of an administrative policy. This is documented [on mdn](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/management/ExtensionInfo) and also [supported by chrome](https://developer.chrome.com/docs/extensions/reference/api/management#type-ExtensionInstallType).
### Add tabs.group API: Chrome Extensions Reference API:[chrome.tabs.group](https://developer.chrome.com/docs/extensions/reference/api/tabs#method-group) ### Add tabGroups API: Chrome Extensions Reference API:[chrome.tabGroups](https://developer.chrome.com/docs/extensions/reference/api/tabGroups) Should I need to split them into two pull requests, if necessary?
Since the official declarative schemas does not include a tabGroups.json, but i develop a browser extension will use the browser.tabGroups API. I want to add a tabGroups.json file in the...