DefinitelyTyped / DefinitelyTyped

The repository for high quality TypeScript type definitions.
Other
48.45k stars 30.14k forks source link

react-native-version check country verification #52287

Open Fernando922 opened 3 years ago

Fernando922 commented 3 years ago

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch @types/react-native-version-check@3.4.1 for the project I'm working on.

however if I need to check the current version of the application available in the store, it is not possible using ios, because I need to provide as a parameter a string with the acronym of the country of the app. However, there is no country verification in the type file.

Here is the diff that solved my problem:

diff --git a/node_modules/@types/react-native-version-check/index.d.ts b/node_modules/@types/react-native-version-check/index.d.ts
index cefec06..881d3a9 100644
--- a/node_modules/@types/react-native-version-check/index.d.ts
+++ b/node_modules/@types/react-native-version-check/index.d.ts
@@ -111,6 +111,9 @@ declare namespace VersionCheck {
         /**
          * @default false
          */
+        country?: string;
+        // it is necessary to apple store find the correct app
+
         forceUpdate?: boolean;
         /**
          * provider name or function that returns promise or value of the latest version

This issue body was partially generated by patch-package.

sclavijo93 commented 3 years ago

Hi @Fernando922 , thanks for the patch!