diff --git a/packages/integrations/src/offline.ts b/packages/integrations/src/offline.ts index 1f7efb5b1798..654795b018c1 100644 --- a/packages/integrations/src/offline.ts +++ b/packages/integrations/src/offline.ts @@ -1,8 +1,18 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ /* eslint-disable @typescript-eslint/no-unsafe-member-access */ import { Event, EventProcessor, Hub, Integration } from '@sentry/types'; import { getGlobalObject, logger, normalize, uuid4 } from '@sentry/utils'; import localForage from 'localforage'; +type LocalForage = { + setItem(key: string, value: T, callback?: (err: any, value: T) => void): Promise; + iterate( + iteratee: (value: T, key: string, iterationNumber: number) => U, + callback?: (err: any, result: U) => void, + ): Promise; + removeItem(key: string, callback?: (err: any) => void): Promise; +}; + /** * cache offline errors and send when connected */ @@ -36,7 +46,7 @@ export class Offline implements Integration { /** * event cache */ - public offlineEventStore: typeof localForage; + public offlineEventStore: LocalForage; /** * @inheritDoc