Skip to content
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

ws added EventListenerOptions and removed optional flag on callback #46794

Merged

Conversation

wilwade
Copy link
Contributor

@wilwade wilwade commented Aug 14, 2020

Fixing types around addEventListener for the ws package:

Please fill in this template.

  • 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 (or tsc if no tslint.json is present).

Select one of these and delete the others:

If changing an existing definition:

@typescript-bot
Copy link
Contributor

typescript-bot commented Aug 14, 2020

@wilwade 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 Reviews

Because you edited one package and updated the tests (👏), I can help you merge this PR once someone else signs off on it.

Status

  • ✅ No merge conflicts
  • ✅ Continuous integration tests have passed
  • ✅ Most recent commit is approved by type definition owners or DT maintainers

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": 46794,
  "author": "wilwade",
  "owners": [
    "loyd",
    "elithrar",
    "mlamp",
    "TitaneBoy",
    "orblazer",
    "reduckted",
    "teidesu",
    "wojtkowiak"
  ],
  "dangerLevel": "ScopedAndTested",
  "headCommitAbbrOid": "ecea87a",
  "headCommitOid": "ecea87a8ae3f48365b5b6fe575f8e80e2c661b06",
  "mergeIsRequested": true,
  "stalenessInDays": 0,
  "lastPushDate": "2020-08-14T20:50:20.000Z",
  "lastCommentDate": "2020-09-28T22:46:40.000Z",
  "maintainerBlessed": true,
  "reviewLink": "https://github.com/DefinitelyTyped/DefinitelyTyped/pull/46794/files",
  "hasMergeConflict": false,
  "authorIsOwner": false,
  "isFirstContribution": true,
  "popularityLevel": "Critical",
  "newPackages": [],
  "packages": [
    "ws"
  ],
  "files": [
    {
      "path": "types/ws/index.d.ts",
      "kind": "definition",
      "package": "ws"
    },
    {
      "path": "types/ws/ws-tests.ts",
      "kind": "test",
      "package": "ws"
    }
  ],
  "hasDismissedReview": false,
  "ciResult": "pass",
  "lastReviewDate": "2020-09-28T18:30:52.000Z",
  "reviewersWithStaleReviews": [],
  "approvalFlags": 4,
  "isChangesRequested": false
}

@typescript-bot
Copy link
Contributor

🔔 @loyd @elithrar @mlamp @TitaneBoy @orblazer @reduckted @teidesu @wojtkowiak — please review this PR in the next few days. Be sure to explicitly select Approve or Request Changes in the GitHub UI so I know what's going on.

@danger-public
Copy link

Inspecting the JavaScript source for this package found some properties that are not in the .d.ts files.
The check for missing properties isn't always right, so take this list as advice, not a requirement.

ws (unpkg)

was missing the following properties:

  1. once
  2. EventEmitter
  3. Receiver
  4. Sender

Generated by 🚫 dangerJS against ecea87a

@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Maintainer Review in New Pull Request Status Board Aug 14, 2020
@typescript-bot
Copy link
Contributor

👋 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 📊
master #46794 diff
Batch compilation
Memory usage (MiB) 65.4 67.8 +3.6%
Type count 9215 9220 0%
Assignability cache size 1727 1727 0%
Language service
Samples taken 282 292 +4%
Identifiers in tests 282 292 +4%
getCompletionsAtPosition
    Mean duration (ms) 360.2 354.2 -1.7%
    Mean CV 8.8% 8.8%
    Worst duration (ms) 492.8 442.2 -10.3%
    Worst identifier http event
getQuickInfoAtPosition
    Mean duration (ms) 360.9 353.2 -2.1%
    Mean CV 9.0% 9.1% +1.3%
    Worst duration (ms) 437.1 446.9 +2.2%
    Worst identifier createServer once

It looks like nothing changed too much. I won’t post performance data again unless it gets worse.

@typescript-bot typescript-bot added Perf: Same typescript-bot determined that this PR will not significantly impact compilation performance. Popular package This PR affects a popular package (as counted by NPM download counts). and removed Critical package labels Aug 14, 2020
@typescript-bot typescript-bot moved this from Needs Maintainer Review to Waiting for Code Reviews in New Pull Request Status Board Aug 17, 2020
@typescript-bot typescript-bot added Critical package and removed Popular package This PR affects a popular package (as counted by NPM download counts). labels Aug 18, 2020
@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Maintainer Review in New Pull Request Status Board Aug 18, 2020
@typescript-bot typescript-bot added Unmerged The author did not merge the PR when it was ready. Popular package This PR affects a popular package (as counted by NPM download counts). and removed Critical package labels Aug 24, 2020
@typescript-bot typescript-bot moved this from Needs Maintainer Review to Needs Maintainer Action in New Pull Request Status Board Aug 24, 2020
@typescript-bot typescript-bot added Critical package and removed Popular package This PR affects a popular package (as counted by NPM download counts). Unmerged The author did not merge the PR when it was ready. labels Aug 25, 2020
@typescript-bot typescript-bot moved this from Needs Maintainer Action to Needs Maintainer Review in New Pull Request Status Board Aug 27, 2020
@elibarzilay elibarzilay moved this from Needs Maintainer Review to Waiting for Code Reviews in New Pull Request Status Board Aug 28, 2020
@typescript-bot typescript-bot added Popular package This PR affects a popular package (as counted by NPM download counts). Critical package and removed Critical package Popular package This PR affects a popular package (as counted by NPM download counts). labels Sep 14, 2020
@typescript-bot typescript-bot added the Abandoned This PR had no activity for a long time, and is considered abandoned label Sep 28, 2020
@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Maintainer Action in New Pull Request Status Board Sep 28, 2020
Copy link
Contributor

@amcasey amcasey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally, I might also add a test demonstrating that not passing a callback is an error.

@typescript-bot typescript-bot added Maintainer Approved Self Merge This PR can now be self-merged by the PR author or an owner and removed Abandoned This PR had no activity for a long time, and is considered abandoned labels Sep 28, 2020
@typescript-bot typescript-bot moved this from Needs Maintainer Action to Waiting for Author to Merge in New Pull Request Status Board Sep 28, 2020
@typescript-bot
Copy link
Contributor

@wilwade 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:

Ready to merge

and I'll merge this PR almost instantly. Thanks for helping out! ❤️

(@loyd, @elithrar, @mlamp, @TitaneBoy, @orblazer, @reduckted, @teidesu, @wojtkowiak: you can do this too.)

@wilwade
Copy link
Contributor Author

wilwade commented Sep 28, 2020

Ready to merge

@typescript-bot typescript-bot moved this from Waiting for Author to Merge to Recently Merged in New Pull Request Status Board Sep 28, 2020
@typescript-bot typescript-bot merged commit 744ed6c into DefinitelyTyped:master Sep 28, 2020
@wilwade wilwade deleted the fix-ws-addEventListener-options branch September 28, 2020 22:47
@typescript-bot
Copy link
Contributor

I just published @types/ws@7.2.7 to npm.

@typescript-bot typescript-bot removed this from Recently Merged in New Pull Request Status Board Sep 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Critical package Maintainer Approved Perf: Same typescript-bot determined that this PR will not significantly impact compilation performance. Self Merge This PR can now be self-merged by the PR author or an owner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants