Skip to content

@types added #96

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
KM8Oz opened this issue Jun 2, 2022 · 2 comments
Open

@types added #96

KM8Oz opened this issue Jun 2, 2022 · 2 comments
Labels
question Further information is requested

Comments

@KM8Oz
Copy link

KM8Oz commented Jun 2, 2022

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch [email protected] 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.

@RoJoHub
Copy link
Owner

RoJoHub commented Jul 28, 2022

It's my result.
It seems something is wrong.
image

@RoJoHub RoJoHub added the question Further information is requested label Jul 28, 2022
@KM8Oz
Copy link
Author

KM8Oz commented Dec 8, 2022

It's my result. It seems something is wrong. image

@RoJoHub this is really not an issus as I said, just add an index.d.ts to package folder after installing it with yarn add react-native-ping then you can run npx patch-package react-native-ping to preserve those changes.
the error you got just saying that you made no change in the package folder to patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants