UNPKG

@clerk/shared

Version:

Internal package utils used by the Clerk SDKs

17 lines • 762 B
//#region src/internal/clerk-js/localStorage.d.ts declare const CLERK_ENVIRONMENT_STORAGE_ENTRY = "environment"; declare const PASSWORD_CONFIRMATION_ERROR_STORAGE_ENTRY = "password_confirmation_error"; /** * Safe wrapper around localStorage that automatically prefixes keys with 'clerk_' * and handles potential errors and entry expiration */ declare class SafeLocalStorage { private static _key; private static isExpired; static setItem(key: string, value: unknown, expiresInMs?: number): void; static getItem<T>(key: string, defaultValue: T): T; static removeItem(key: string): void; } //#endregion export { CLERK_ENVIRONMENT_STORAGE_ENTRY, PASSWORD_CONFIRMATION_ERROR_STORAGE_ENTRY, SafeLocalStorage }; //# sourceMappingURL=localStorage.d.mts.map