Skip to content

@types added #96

@KM8Oz

Description

@KM8Oz

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch react-native-ping@1.2.6 for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/react-native-ping/index.d.ts b/node_modules/react-native-ping/index.d.ts
new file mode 100644
index 0000000..25bd7a4
--- /dev/null
+++ b/node_modules/react-native-ping/index.d.ts
@@ -0,0 +1,17 @@
+class Ping {
+    /**
+     *
+     * Get RTT (Round-trip delay time)
+     * 
+     * @static
+     * @param {string} ipAddress - For example : 8.8.8.8
+     * @param {Object} option - Some optional operations
+     * @param {number} option.timeout - timeout
+     * @returns
+     * @memberof Ping
+     */
+    static async start(ipAddress:string, option:{timeout:number}|any):any
+    static async getTrafficStats():any
+}
+
+export default Ping;
\ No newline at end of file

This issue body was partially generated by patch-package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions