[@types/chrome] It seems like in reality chrome.scripting.ExecutionWorld is an enum that can contain both ISOLATED and MAIN #69776
Unanswered
danielhjacobs
asked this question in
Issues with a @types package
Replies: 2 comments 1 reply
-
Thanks for the discussion about "chrome", some useful links for everyone: Pinging the DT module owners: @matthewkimber, @otiai10, @sreimer15, @matcarlson, @ekinsol, @EchoAbstract, @spasma, @bdbai, @pokutuna, @JasonXian, @userTim, @idan315, @nicolas377, @idosal, @fregante. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/chrome/index.d.ts#L7992 defines it as a string with either the value "MAIN" or "ISOLATED", but in reality Chrome and Firefox Nightly (https://bugzilla.mozilla.org/show_bug.cgi?id=1736575) have both
chrome.scripting.ExecutionWorld.MAIN
andchrome.scripting.ExecutionWorld.ISOLATED
defined and Firefox stable has justchrome.scripting.ExecutionWorld.ISOLATED
defined.I'm not sure, but this might also apply to https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/webextension-polyfill/namespaces/scripting.d.ts#L157 and https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/firefox-webext-browser/index.d.ts#L4736
https://developer.chrome.com/docs/extensions/reference/api/scripting#type-ExecutionWorld says that it's an ENUM.
It should be more like this:
https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/chrome/index.d.ts#L12179-L12193
Beta Was this translation helpful? Give feedback.
All reactions