@umituz/react-native-subscription 2.37.7 → 2.37.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umituz/react-native-subscription",
3
- "version": "2.37.7",
3
+ "version": "2.37.8",
4
4
  "description": "Complete subscription management with RevenueCat, paywall UI, and credits system for React Native apps",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -77,7 +77,7 @@ export async function initializeCreditsWithRetry(params: InitializeCreditsParams
77
77
  const exponentialDelay = baseDelay * Math.pow(2, attempt);
78
78
  const jitter = Math.random() * baseDelay;
79
79
  const delay = Math.min(exponentialDelay + jitter, maxDelay);
80
- await new Promise(resolve => setTimeout(resolve, delay));
80
+ await new Promise<void>(resolve => setTimeout(() => resolve(), delay));
81
81
  continue;
82
82
  }
83
83
  break;
@@ -29,7 +29,7 @@ export async function initializeSDK(
29
29
  if (configState.configurationPromise) {
30
30
  await configState.configurationPromise;
31
31
  } else {
32
- await new Promise(resolve => setTimeout(resolve, CONFIGURATION_RETRY_DELAY_MS));
32
+ await new Promise<void>(resolve => setTimeout(() => resolve(), CONFIGURATION_RETRY_DELAY_MS));
33
33
  }
34
34
  retryCount++;
35
35
  }
@@ -65,7 +65,7 @@ export async function initializeSDK(
65
65
  retryCount: configStartRetryCount,
66
66
  error
67
67
  });
68
- await new Promise(resolve => setTimeout(resolve, CONFIGURATION_RETRY_DELAY_MS));
68
+ await new Promise<void>(resolve => setTimeout(() => resolve(), CONFIGURATION_RETRY_DELAY_MS));
69
69
  return initializeSDK(deps, userId, apiKey, configStartRetryCount + 1);
70
70
  }
71
71
 
@@ -41,7 +41,7 @@ class UserSwitchMutexImpl {
41
41
  if (typeof __DEV__ !== 'undefined' && __DEV__) {
42
42
  console.log(`[UserSwitchMutex] Rate limiting: waiting ${delayNeeded}ms`);
43
43
  }
44
- await new Promise(resolve => setTimeout(resolve, delayNeeded));
44
+ await new Promise<void>(resolve => setTimeout(() => resolve(), delayNeeded));
45
45
  }
46
46
  }
47
47
 
@@ -5,7 +5,7 @@ import type { SubscriptionInitConfig } from "../SubscriptionInitializerTypes";
5
5
  const AUTH_STATE_DEBOUNCE_MS = 500; // Wait 500ms before processing auth state changes
6
6
 
7
7
  export async function startBackgroundInitialization(config: SubscriptionInitConfig): Promise<() => void> {
8
- let debounceTimer: NodeJS.Timeout | null = null;
8
+ let debounceTimer: ReturnType<typeof setTimeout> | null = null;
9
9
  let lastUserId: string | undefined = undefined;
10
10
 
11
11
  const initializeInBackground = async (revenueCatUserId?: string): Promise<void> => {