Repository: electron
Issue: powerMonitor.on("thermal-state-change") and powerMonitor.on("speed-limit-change") are not correctly typed in Electron.d.ts
Labels: platform/macOS,documentation :notebook:,bug :beetle:,status/confirmed,32-x-y

### Preflight Checklist

- [x] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project.
- [x] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to.
- [x] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success.

### Electron Version

32.2.2

### What operating system(s) are you using?

macOS

### Operating System Version

macOS Sequoia 15.1.0

### What arch are you using?

arm64 (including Apple Silicon)

### Last Known Working Electron version

31.x and previous

### Expected Behavior

The `powerMonitor.on("speed-limit-change", ({limit: number}) => { ... })` and `powerMonitor.on("thermal-state-change", ({ state: string }) => { ... })` should compile successfully.

Previously, in Electron v31, the `powerMonitor` in `electron.d.ts` was typed correctly, with the following type definitions:
```
    on(event: 'thermal-state-change', listener: Function): this;
...
    on(event: 'speed-limit-change', listener: Function): this;
```



### Actual Behavior

We had code like this:
```
  powerMonitor.on("speed-limit-change", ({ limit: number }) => {
      console.log("PowerMonitor: Speed Limit Change", limit);
  }));

...

  powerMonitor.on("thermal-state-change", ({ state: string }) => {
      console.log("PowerMonitor: Thermal State Change", state);
  }));
```

TypeScript compilation fails with:
```
rc/main/power-monitor.ts:49:19 - error TS2769: No overload matches this call.
  The last overload gave the following error.
    Argument of type '"speed-limit-change"' is not assignable to parameter of type '"user-did-resign-active"'.

49   powerMonitor.on("speed-limit-change", ({ limit }: { limit: number }) => {
                     ~~~~~~~~~~~~~~~~~~~~

  node_modules/electron/electron.d.ts:9936:5
    9936     on(event: 'user-did-resign-active', listener: () => void): this;
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    The last overload is declared here.

src/main/power-monitor.ts:54:19 - error TS2769: No overload matches this call.
  The last overload gave the following error.
    Argument of type '"thermal-state-change"' is not assignable to parameter of type '"user-did-resign-active"'.

54   powerMonitor.on("thermal-state-change", ({ state }: { state: string }) => {
                     ~~~~~~~~~~~~~~~~~~~~~~

  node_modules/electron/electron.d.ts:9936:5
    9936     on(event: 'user-did-resign-active', listener: () => void): this;
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    The last overload is declared here.
```

On further inspection, I found that the `electron.d.ts` was typed as follows:
```
    on(event: 'thermal-state-change', listener: () => void): this;
...
    on(event: 'speed-limit-change', listener: () => void): this;
```
...missing the { limit } and { state } parameters.


At first... I thought maybe this was a breaking API change but didn't find anything in the release notes.

In the docs, the `speed-limit-change` and `thermal-state-change` are still called out as providing an argument `{limit: number}` and `{state: string}` respectively: https://www.electronjs.org/docs/latest/api/power-monitor#event-thermal-state-change-macos

![Image](https://github.com/user-attachments/assets/6f0292c0-0c6b-4102-8e9f-7332110664f5)


### Testcase Gist URL

_No response_

### Additional Information

Looking through the commit history in https://github.com/electron/typescript-definitions, I wonder if this could be a regression from @MarshallOfSound 's change here: https://github.com/electron/typescript-definitions/pull/273 , as it seems the type for the `thermal-state-change` event changed from:
``` 
on(event: 'thermal-state-change', listener: Function): this;
```
to
```
 on(event: 'thermal-state-change', listener: () => void): this;
```