From 29cfab33421bf776405cd100fa0df1468241f7d2 Mon Sep 17 00:00:00 2001 From: Stefanos Anagnostou Date: Wed, 11 Dec 2024 13:33:54 +0200 Subject: [PATCH] Fix comments --- packages/clerk-js/src/core/fapiClient.ts | 3 +-- packages/clerk-js/src/core/resources/OrganizationSettings.ts | 2 +- packages/clerk-js/src/core/resources/UserSettings.ts | 2 +- packages/expo/src/cache/dummy-data/client-resource.ts | 2 +- packages/expo/src/cache/dummy-data/environment-resource.ts | 2 +- 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/packages/clerk-js/src/core/fapiClient.ts b/packages/clerk-js/src/core/fapiClient.ts index ce1362d573..3c958b5594 100644 --- a/packages/clerk-js/src/core/fapiClient.ts +++ b/packages/clerk-js/src/core/fapiClient.ts @@ -229,8 +229,7 @@ export function createFapiClient(clerkInstance: Clerk): FapiClient { try { if (beforeRequestCallbacksResult) { - let maxTries = isBrowserOnline() ? 4 : 11; - maxTries = options?.fetchMaxTries ?? maxTries; + const maxTries = options?.fetchMaxTries ?? (isBrowserOnline() ? 4 : 11); response = // retry only on GET requests for safety overwrittenRequestMethod === 'GET' diff --git a/packages/clerk-js/src/core/resources/OrganizationSettings.ts b/packages/clerk-js/src/core/resources/OrganizationSettings.ts index 04febd8f1a..bc3465cd6b 100644 --- a/packages/clerk-js/src/core/resources/OrganizationSettings.ts +++ b/packages/clerk-js/src/core/resources/OrganizationSettings.ts @@ -44,6 +44,6 @@ export class OrganizationSettings extends BaseResource implements OrganizationSe enrollment_modes: this.domains.enrollmentModes, default_role: this.domains.defaultRole, }, - } as any as OrganizationSettingsJSON; + } as unknown as OrganizationSettingsJSON; } } diff --git a/packages/clerk-js/src/core/resources/UserSettings.ts b/packages/clerk-js/src/core/resources/UserSettings.ts index 5f832a51aa..fdc98a3c00 100644 --- a/packages/clerk-js/src/core/resources/UserSettings.ts +++ b/packages/clerk-js/src/core/resources/UserSettings.ts @@ -103,7 +103,7 @@ export class UserSettings extends BaseResource implements UserSettingsResource { sign_up: this.signUp, password_settings: this.passwordSettings, passkey_settings: this.passkeySettings, - } as any as UserSettingsJSON; + } as unknown as UserSettingsJSON; } private getEnabledFirstFactorIdentifiers(attributes: Attributes): Array { diff --git a/packages/expo/src/cache/dummy-data/client-resource.ts b/packages/expo/src/cache/dummy-data/client-resource.ts index 2445b821ab..5682e7de2e 100644 --- a/packages/expo/src/cache/dummy-data/client-resource.ts +++ b/packages/expo/src/cache/dummy-data/client-resource.ts @@ -127,4 +127,4 @@ export const DUMMY_CLERK_CLIENT_RESOURCE = { cookie_expires_at: null, created_at: new Date().getTime(), updated_at: new Date().getTime(), -} as any as ClientJSON; +} as unknown as ClientJSON; diff --git a/packages/expo/src/cache/dummy-data/environment-resource.ts b/packages/expo/src/cache/dummy-data/environment-resource.ts index 9c70302fec..d10d372c07 100644 --- a/packages/expo/src/cache/dummy-data/environment-resource.ts +++ b/packages/expo/src/cache/dummy-data/environment-resource.ts @@ -225,4 +225,4 @@ export const DUMMY_CLERK_ENVIRONMENT_RESOURCE = { domains: { enabled: false, enrollment_modes: [], default_role: null }, }, maintenance_mode: false, -} as any as EnvironmentJSON; +} as unknown as EnvironmentJSON;