Skip to content

Electron 7.1.x has bad typescript definition for BrowserWindow.hookWindowMessage #21237

@amirburbea

Description

@amirburbea

Preflight Checklist

  • I have read the Contributing Guidelines for this project.
  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for an issue that matches the one I want to file, without success.

Issue Details

  • Electron Version:
    • 7.1.6
  • Operating System:
    • Windows 10 (1909) x64
  • Last Known Working Electron version:
    • 6.1.6

BrowserWindow.hookWindowMessage is currently incorrectly defined in electron.d.ts

    /**
     * Hooks a windows message. The `callback` is called when the message is received
     * in the WndProc.
     *
     * @platform win32
     */
    hookWindowMessage(message: number, callback: () => void): void;

but needs to change to

hookWindowMessage(message: number, callback: (lParam: Buffer, wParam: Buffer) => void): void;

And is complaining when I try to use a function making use of lParam/wParam.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions