[chrome] Add missing definitions of functions (mainly MV3)#59188
[chrome] Add missing definitions of functions (mainly MV3)#59188typescript-bot merged 13 commits intoDefinitelyTyped:masterfrom michaelts1:master
Conversation
|
@michaelts1 Thank you for submitting this PR! I see this is your first time submitting to DefinitelyTyped 👋 — I'm the local bot who will help you through the process of getting things through. This is a live comment which I will keep updated. 1 package in this PR
Code ReviewsBecause you edited one package and updated the tests (👏), I can help you merge this PR once someone else signs off on it. You can test the changes of this PR in the Playground. Status
All of the items on the list are green. To merge, you need to post a comment including the string "Ready to merge" to bring in your changes. Diagnostic Information: What the bot saw about this PR{
"type": "info",
"now": "-",
"pr_number": 59188,
"author": "michaelts1",
"headCommitOid": "9f8ef5c5a80aa8a37f4146b39750d70a17c4d028",
"mergeBaseOid": "7b28a955818ce689fc3a128509122cef90200dcc",
"lastPushDate": "2022-03-08T12:02:24.000Z",
"lastActivityDate": "2022-03-15T21:31:46.000Z",
"mergeOfferDate": "2022-03-15T21:22:44.000Z",
"mergeRequestDate": "2022-03-15T21:31:46.000Z",
"mergeRequestUser": "michaelts1",
"hasMergeConflict": false,
"isFirstContribution": true,
"tooManyFiles": false,
"hugeChange": false,
"popularityLevel": "Popular",
"pkgInfo": [
{
"name": "chrome",
"kind": "edit",
"files": [
{
"path": "types/chrome/index.d.ts",
"kind": "definition"
},
{
"path": "types/chrome/test/index.ts",
"kind": "test"
}
],
"owners": [
"matthewkimber",
"otiai10",
"rreverser",
"sreimer15",
"MatCarlson",
"ekinsol",
"tregagnon",
"echoabstract",
"spasma",
"bdbai",
"pokutuna",
"JasonXian",
"usertim",
"idan315",
"nicolas377",
"idosal"
],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Popular"
}
],
"reviews": [
{
"type": "approved",
"reviewer": "JasonXian",
"date": "2022-03-15T21:22:05.000Z",
"isMaintainer": false
}
],
"mainBotCommentID": 1061740745,
"ciResult": "pass"
} |
|
🔔 @matthewkimber @otiai10 @RReverser @sreimer15 @matcarlson @ekinsol @tregagnon @EchoAbstract @spasma @bdbai @pokutuna @JasonXian @userTim @idan315 @nicolas377 @idosal — please review this PR in the next few days. Be sure to explicitly select |
|
Should I split this PR into multiple smaller PRs? |
JasonXian
left a comment
There was a problem hiding this comment.
Changes are mostly additive and match docs, tests look great as well. Thanks for taking the time to do this!
|
Ready to merge |
|
Yes, the definitions are wrong here. According the the docs, As I have stated above, I have not not updated all namespaces, so this is just another instance of an outdated definition. I don't have the time to update more definitions right now, but if you feel like doing so you can update them yourself and send a new PR. |
|
Not sure I can make it but thanks anyway for your reply and your work. |

This pull request adds definitions for missing functions in a number of
chrome.*namespaces.I have noticed that some of the definitions for chrome are out of date and don't include the new MV3 promise-based signatures, so I decided to update the definitions myself. I have not not updated all namespaces, so there is still work to be done updating the rest of the definitions.
While updating the definitions, I have noticed a few incorrect parameter types or completely missing functions, so I went ahead and added them too.
I have tried to to keep using the same style already found in the files.
Please fill in this template.
npm test <package to test>.Select one of these and delete the others:
If changing an existing definition:
All new/modified signatures in this PR are from the official documentation (https://developer.chrome.com/docs/extensions/reference).
Note that the definitions in the linked resources incorrectly say that returning a promise "is coming soon and not yet in a stable release of Chrome". This is not true, and I have tested all function signatures using the latest stable Chrome version (v99) before adding them.
Links to individual documentation pages in case they are needed: