Skip to content

Commit

Permalink
feat: add typescript support
Browse files Browse the repository at this point in the history
  • Loading branch information
dayze committed Feb 23, 2021
1 parent accd300 commit 99feae8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
13 changes: 13 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
declare module 'react-native-voip-push-notification' {
export type Events =
'notification' |
'register'|
'didLoadWithEvents';

export default class RNVoipPushNotification {
static addEventListener(type: Events, handler: (args: any) => void): void
static registerVoipToken(): void;
static onVoipNotificationCompleted(uuid: string): void;
static removeEventListener(type: Events): void
}
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "3.1.0",
"description": "VoIP push notification on react-native",
"main": "index.js",
"typings": "./index.d.ts",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
Expand Down

0 comments on commit 99feae8

Please sign in to comment.