Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[pg] Add missing "connect" event to ClientBase.on typings#75289

Open
bobnil wants to merge 1 commit into
DefinitelyTyped:masterDefinitelyTyped/DefinitelyTyped:masterfrom
bobnil:fix-pg-client-connect-eventbobnil/DefinitelyTyped:fix-pg-client-connect-eventCopy head branch name to clipboard
Open

[pg] Add missing "connect" event to ClientBase.on typings#75289
bobnil wants to merge 1 commit into
DefinitelyTyped:masterDefinitelyTyped/DefinitelyTyped:masterfrom
bobnil:fix-pg-client-connect-eventbobnil/DefinitelyTyped:fix-pg-client-connect-eventCopy head branch name to clipboard

Conversation

@bobnil

@bobnil bobnil commented Jul 20, 2026

Copy link
Copy Markdown

Add the missing connect event to the ClientBase.on overload in @types/pg.

The connect event is emitted without arguments, so its listener should be typed as () => void.

The event is emitted by Client here:
https://github.com/brianc/node-postgres/blob/e35aed91cb8f04116b3557e09adf33e2677af1ed/packages/pg/lib/client.js

A regression test was added to pg-tests.mts. The test fails without the declaration change and passes with it.

@typescript-automation

typescript-automation Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

@bobnil Thank you for submitting this PR!

This is a live comment that I will keep updated.

1 package in this PR

Code Reviews

Because this is a widely-used package, a DT maintainer will need to review it before it can be merged.

You can test the changes of this PR in the Playground.

Status

  • ✅ No merge conflicts
  • ✅ Continuous integration tests have passed
  • 🕐 Most recent commit is approved by a DT maintainer

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": 75289,
  "author": "bobnil",
  "headCommitOid": "7c47556d69e1b06527bb3f27525ac80bf3f0ecfe",
  "mergeBaseOid": "ba1ccec41e07ce7972674b33daa9b0a327863597",
  "lastPushDate": "2026-07-20T11:33:02.000Z",
  "lastActivityDate": "2026-07-20T11:33:02.000Z",
  "hasMergeConflict": false,
  "isFirstContribution": false,
  "tooManyFiles": false,
  "hugeChange": false,
  "tooManyCommits": false,
  "tooManyReviews": false,
  "popularityLevel": "Critical",
  "pkgInfo": [
    {
      "name": "pg",
      "kind": "edit",
      "files": [
        {
          "path": "types/pg/index.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/pg/pg-tests.mts",
          "kind": "test"
        }
      ],
      "owners": [
        "pspeter3"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Critical"
    }
  ],
  "reviews": [],
  "mainBotCommentID": 5021764754,
  "ciResult": "pass"
}

@typescript-automation

Copy link
Copy Markdown
Contributor

🔔 @pspeter3 — 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.

@typescript-automation typescript-automation Bot moved this to Waiting for Code Reviews in Pull Request Status Board Jul 20, 2026
@typescript-automation typescript-automation Bot moved this from Waiting for Code Reviews to Needs Maintainer Review in Pull Request Status Board Jul 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Needs Maintainer Review

Development

Successfully merging this pull request may close these issues.

1 participant

Morty Proxy This is a proxified and sanitized view of the page, visit original site.