-
Notifications
You must be signed in to change notification settings - Fork 29.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lots of fixes for firefox-webext-browser #46342
Lots of fixes for firefox-webext-browser #46342
Conversation
- Fix handling of some functions with optional parameters (browser.runtime.connect, browser.alarms.create, etc, jsmnbom/definitelytyped-firefox-webext-browser#36) - Fix a couple of return types (browser.alarms.get, browser.cookies.get, browser.cookies.remove) jsmnbom/definitelytyped-firefox-webext-browser#35 - Fix additional types from events having "Undefined in their name" - Make "enums" with a single item not output an additional type - Finally always use addtionaltypes for internal interfaces (with underscores in front) - this allows for using them in user code jsmnbom/definitelytyped-firefox-webext-browser#31
@jsmnbom Thank you for submitting this PR! This is a live comment which I will keep updated. Code ReviewsThere aren't any other owners of this package, so a DT maintainer will review it. Status
Once every item on this list is checked, I'll ask you for permission to merge and publish the changes. Diagnostic Information: What the bot saw about this PR{
"type": "info",
"now": "-",
"pr_number": 46342,
"author": "jsmnbom",
"owners": [
"jsmnbom"
],
"dangerLevel": "ScopedAndConfiguration",
"headCommitAbbrOid": "deedf99",
"headCommitOid": "deedf9984d04ea63bd33048214e8b8a8d72447dc",
"mergeIsRequested": true,
"stalenessInDays": 0,
"lastPushDate": "2020-07-25T14:31:03.000Z",
"lastCommentDate": "2020-07-28T22:16:03.000Z",
"maintainerBlessed": false,
"reviewLink": "https://github.com/DefinitelyTyped/DefinitelyTyped/pull/46342/files",
"hasMergeConflict": false,
"authorIsOwner": true,
"isFirstContribution": false,
"popularityLevel": "Well-liked by everyone",
"anyPackageIsNew": false,
"packages": [
"firefox-webext-browser"
],
"files": [
{
"path": "types/firefox-webext-browser/firefox-webext-browser-tests.ts",
"kind": "test",
"package": "firefox-webext-browser"
},
{
"path": "types/firefox-webext-browser/index.d.ts",
"kind": "definition",
"package": "firefox-webext-browser"
},
{
"path": "types/firefox-webext-browser/tslint.json",
"kind": "package-meta",
"package": "firefox-webext-browser",
"suspect": "not the required form"
}
],
"hasDismissedReview": false,
"ciResult": "pass",
"lastReviewDate": "2020-07-28T21:56:23.000Z",
"reviewersWithStaleReviews": [],
"approvalFlags": 5,
"isChangesRequested": false
} |
🔔 @jsmnbom — you're the only owner, but it would still be good if you find someone to review this PR in the next few days, otherwise a maintainer will look at it. (And if you do find someone, maybe even recruit them to be a second owner to make future changes easier...) |
👋 Hi there! I’ve run some quick measurements against master and your PR. These metrics should help the humans reviewing this PR gauge whether it might negatively affect compile times or editor responsiveness for users who install these typings. Let’s review the numbers, shall we? Comparison details 📊
It looks like nothing changed too much. I won’t post performance data again unless it gets worse. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jsmnbom thx for the contribution!
@jsmnbom Everything looks good here. Great job! I am ready to merge this PR on your behalf. If you'd like that to happen, please post a comment saying:
and I'll merge this PR almost instantly. Thanks for helping out! ❤️ |
Ready to merge |
I just published |
…wser by @jsmnbom - Fix handling of some functions with optional parameters (browser.runtime.connect, browser.alarms.create, etc, jsmnbom/definitelytyped-firefox-webext-browser#36) - Fix a couple of return types (browser.alarms.get, browser.cookies.get, browser.cookies.remove) jsmnbom/definitelytyped-firefox-webext-browser#35 - Fix additional types from events having "Undefined in their name" - Make "enums" with a single item not output an additional type - Finally always use addtionaltypes for internal interfaces (with underscores in front) - this allows for using them in user code jsmnbom/definitelytyped-firefox-webext-browser#31
…wser by @jsmnbom - Fix handling of some functions with optional parameters (browser.runtime.connect, browser.alarms.create, etc, jsmnbom/definitelytyped-firefox-webext-browser#36) - Fix a couple of return types (browser.alarms.get, browser.cookies.get, browser.cookies.remove) jsmnbom/definitelytyped-firefox-webext-browser#35 - Fix additional types from events having "Undefined in their name" - Make "enums" with a single item not output an additional type - Finally always use addtionaltypes for internal interfaces (with underscores in front) - this allows for using them in user code jsmnbom/definitelytyped-firefox-webext-browser#31
Use a meaningful title for the pull request. Include the name of the package modified.
Test the change in your own code. (Compile and run.)
Add or edit tests to reflect the change. (Run with
npm test
.)Follow the advice from the readme.
Avoid common mistakes.
Run
npm run lint package-name
(ortsc
if notslint.json
is present).Provide a URL to documentation or source code which provides context for the suggested changes: Not a URL but here:
Fix handling of some functions with optional parameters (browser.runtime.connect, browser.alarms.create, etc, browser.runtime.connect should accept connectInfo object as first argument jsmnbom/definitelytyped-firefox-webext-browser#36)
Fix a couple of return types (browser.alarms.get, browser.cookies.get, browser.cookies.remove) browser.alarms.get return value can resolve to
undefined
jsmnbom/definitelytyped-firefox-webext-browser#35Fix additional types from events having "Undefined in their name"
Make "enums" with a single item not output an additional type
Finally always use addtionaltypes for internal interfaces (with underscores in front) - this allows for using them in user code Function parameters as additional types jsmnbom/definitelytyped-firefox-webext-browser#31
Switch to using prettier for formatting, since I no longer use webstorm.
If this PR brings the type definitions up to date with a new version of the JS library, update the version number in the header.
Include tests for your changes
If you are making substantial changes, consider adding a
tslint.json
containing{ "extends": "dtslint/dt.json" }
. If for reason the any rule need to be disabled, disable it for that line using// tslint:disable-next-line [ruleName]
and not for whole package so that the need for disabling can be reviewed.