Skip to content

Conversation

@Renegade334
Copy link
Contributor

electron augments the NodeJS.Process interface with its own event overloads. If @types/node's own process event methods are inherited, rather than defined on the interface itself, then any augmented overloads cause the inherited definitions to vanish. Switch to using the alternate pattern.

@typescript-bot typescript-bot moved this to Needs Author Action in Pull Request Status Board Jan 21, 2026
@Renegade334 Renegade334 marked this pull request as ready for review January 21, 2026 22:56
@typescript-bot
Copy link
Contributor

typescript-bot commented Jan 21, 2026

@Renegade334 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
  • ✅ Only a DT maintainer can approve changes without tests

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": 74380,
  "author": "Renegade334",
  "headCommitOid": "9c0429e2ae329ef94bed7e63361bd71747f844a3",
  "mergeBaseOid": "fffee71d83ce76670301d5bee9ca8f930a930dc3",
  "lastPushDate": "2026-01-21T22:41:39.000Z",
  "lastActivityDate": "2026-01-21T23:15:47.000Z",
  "mergeOfferDate": "2026-01-21T23:05:45.000Z",
  "mergeRequestDate": "2026-01-21T23:15:47.000Z",
  "mergeRequestUser": "Renegade334",
  "hasMergeConflict": false,
  "isFirstContribution": false,
  "tooManyFiles": false,
  "hugeChange": false,
  "popularityLevel": "Critical",
  "pkgInfo": [
    {
      "name": "node",
      "kind": "edit",
      "files": [
        {
          "path": "types/node/process.d.ts",
          "kind": "definition"
        }
      ],
      "owners": [
        "Microsoft",
        "jkomyno",
        "r3nya",
        "btoueg",
        "touffy",
        "mohsen1",
        "galkin",
        "eps1lon",
        "WilcoBakker",
        "chyzwar",
        "trivikr",
        "yoursunny",
        "qwelias",
        "ExE-Boss",
        "peterblazejewicz",
        "addaleax",
        "victorperin",
        "NodeJS",
        "LinusU",
        "wafuwafu13",
        "mcollina",
        "Semigradsky",
        "Renegade334",
        "anonrig"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Critical"
    }
  ],
  "reviews": [
    {
      "type": "approved",
      "reviewer": "jakebailey",
      "date": "2026-01-21T23:05:06.000Z",
      "isMaintainer": true
    }
  ],
  "mainBotCommentID": 3781518427,
  "ciResult": "pass"
}

@typescript-bot typescript-bot added Critical package Author is Owner The author of this PR is a listed owner of the package. Untested Change This PR does not touch tests labels Jan 21, 2026
@typescript-bot
Copy link
Contributor

Hey @Renegade334,

😒 Your PR doesn't modify any tests, so it's hard to know what's being fixed, and your changes might regress in the future. Please consider adding tests to cover the change you're making. Including tests allows this PR to be merged by yourself and the owners of this module.

This can potentially save days of time for you!

@typescript-bot typescript-bot moved this from Needs Author Action to Needs Maintainer Review in Pull Request Status Board Jan 21, 2026
@typescript-bot
Copy link
Contributor

🔔 @microsoft @jkomyno @r3nya @btoueg @Touffy @mohsen1 @galkin @eps1lon @WilcoBakker @chyzwar @trivikr @yoursunny @qwelias @ExE-Boss @peterblazejewicz @addaleax @victorperin @nodejs @LinusU @wafuwafu13 @mcollina @Semigradsky @anonrig — 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.

@@ -1,6 +1,5 @@
declare module "node:process" {
import { Control, MessageOptions, SendHandle } from "node:child_process";
import { InternalEventEmitter } from "node:events";
Copy link
Member

Choose a reason for hiding this comment

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

Is InternalEventEmitter still referenced after this?

Copy link
Contributor Author

@Renegade334 Renegade334 Jan 21, 2026

Choose a reason for hiding this comment

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

Not within process.d.ts.

It still sees some use for directly-inherited EventEmitter classes, as inheriting where possible is more straightforward than copying all the overloads. We could switch to a single pattern throughout, but given that it doesn't really make sense to add augmented event definitions to a Node.js base class, the rest are probably fine.

@typescript-bot typescript-bot added Maintainer Approved Self Merge This PR can now be self-merged by the PR author or an owner labels Jan 21, 2026
@typescript-bot typescript-bot moved this from Needs Maintainer Review to Waiting for Author to Merge in Pull Request Status Board Jan 21, 2026
@typescript-bot
Copy link
Contributor

@Renegade334: Everything looks good here. I am ready to merge this PR (at 9c0429e) on your behalf whenever you think it's ready.

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! ❤️

(@microsoft, @jkomyno, @r3nya, @btoueg, @Touffy, @mohsen1, @galkin, @eps1lon, @WilcoBakker, @chyzwar, @trivikr, @yoursunny, @qwelias, @ExE-Boss, @peterblazejewicz, @addaleax, @victorperin, @nodejs, @LinusU, @wafuwafu13, @mcollina, @Semigradsky, @anonrig: you can do this too.)

@Renegade334
Copy link
Contributor Author

Ready to merge.

@typescript-bot typescript-bot moved this from Waiting for Author to Merge to Recently Merged in Pull Request Status Board Jan 21, 2026
@typescript-bot typescript-bot merged commit e0a3d3e into DefinitelyTyped:master Jan 21, 2026
15 checks passed
@Renegade334 Renegade334 deleted the process-event-heritage branch January 21, 2026 23:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Author is Owner The author of this PR is a listed owner of the package. Critical package Maintainer Approved Self Merge This PR can now be self-merged by the PR author or an owner Untested Change This PR does not touch tests

Projects

Status: Recently Merged

Development

Successfully merging this pull request may close these issues.

3 participants