MatthieuLemoine / electron-push-receiver

A module to bring Web Push support to Electron allowing it to receive notifications from Firebase Cloud Messaging (FCM).
https://medium.com/@MatthieuLemoine/my-journey-to-bring-web-push-support-to-node-and-electron-ce70eea1c0b0
MIT License
191 stars 62 forks source link

Typescript definition file #10

Closed nolawnchairs closed 6 years ago

nolawnchairs commented 6 years ago

Hi,

Not a bug or issue, quite the contrary. I implemented this into my TypeScript electron project, and since you don't have a types file, I made one:

interface ElectronPushReceiver {
    START_NOTIFICATION_SERVICE: string;
    NOTIFICATION_SERVICE_STARTED: string;
    NOTIFICATION_SERVICE_ERROR: string;
    NOTIFICATION_RECEIVED: string;
    TOKEN_UPDATED: string;
    setup: (webContents: Electron.WebContents) => void;
}

declare const electronPushReceiver: ElectronPushReceiver;
export = electronPushReceiver;

Cheers.

MatthieuLemoine commented 6 years ago

@mweiczorek Can you make a PR to add this types file ?

nolawnchairs commented 6 years ago

Yeah, I don't know how to do that for projects other than my own.

MatthieuLemoine commented 6 years ago

You need to fork this project. Then clone it, make your changes, commit & pull. After that, you'll see a message asking you if you want to create a pull request.

MatthieuLemoine commented 6 years ago

Fixed in #17.