Skip to content

Commit fbc9979

Browse files
committed
feat: type added
1 parent 9c186fb commit fbc9979

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
lines changed

package/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-outline-vpn",
3-
"version": "1.0.3",
3+
"version": "1.0.4",
44
"description": "Outline VPN React Native Client",
55
"main": "src/index",
66
"module": "src/index",

package/src/types.d.ts

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,3 @@
1-
/**
2-
* Start Outline VPN
3-
* @param callback A callback function that will receive the result of the suppression.
4-
* - result: A number representing the result of the suppression.
5-
* 0: Not Supported
6-
* 1: Already suppressed
7-
* 2: Denied
8-
* 3: Cancelled
9-
* 4: Success
10-
*/
111
export interface vpnOptions {
122
host: string;
133
port: number;
@@ -20,4 +10,10 @@ export interface vpnOptions {
2010
localizedDescription?: string;
2111
}
2212

13+
export interface VpnModule {
14+
startVpn(options: VpnOptions): Promise<boolean | string>;
15+
}
16+
17+
declare const vpnModule: VpnModule;
18+
export default vpnModule;
2319
export type startVPN = (data: vpnOptions) => Promise<String | Boolean>;

0 commit comments

Comments
 (0)