Skip to content

Commit 99feae8

Browse files
committed
feat: add typescript support
1 parent accd300 commit 99feae8

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

index.d.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
declare module 'react-native-voip-push-notification' {
2+
export type Events =
3+
'notification' |
4+
'register'|
5+
'didLoadWithEvents';
6+
7+
export default class RNVoipPushNotification {
8+
static addEventListener(type: Events, handler: (args: any) => void): void
9+
static registerVoipToken(): void;
10+
static onVoipNotificationCompleted(uuid: string): void;
11+
static removeEventListener(type: Events): void
12+
}
13+
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "3.1.0",
44
"description": "VoIP push notification on react-native",
55
"main": "index.js",
6+
"typings": "./index.d.ts",
67
"scripts": {
78
"test": "echo \"Error: no test specified\" && exit 1"
89
},

0 commit comments

Comments
 (0)