From b62a4d31ed3f5dd3240c18d730678f29a8fa24ac Mon Sep 17 00:00:00 2001 From: Abhijeet Prasad Date: Fri, 28 Aug 2020 03:41:08 -0400 Subject: [PATCH] fix(integrations): Add localforage typing (#2856) Co-authored-by: Rodolfo Carvalho --- packages/integrations/src/offline.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/integrations/src/offline.ts b/packages/integrations/src/offline.ts index 51bcb6b80d73..dac92c0e5619 100644 --- a/packages/integrations/src/offline.ts +++ b/packages/integrations/src/offline.ts @@ -1,7 +1,6 @@ import { Event, EventProcessor, Hub, Integration } from '@sentry/types'; import { getGlobalObject, logger, uuid4 } from '@sentry/utils'; -// @ts-ignore: Module '"localforage"' has no default export. -import localforage from 'localforage'; +import * as localForage from 'localforage'; /** * cache offline errors and send when connected @@ -43,7 +42,7 @@ export class Offline implements Integration { public constructor(options: { maxStoredEvents?: number } = {}) { this.global = getGlobalObject(); this.maxStoredEvents = options.maxStoredEvents || 30; // set a reasonable default - this.offlineEventStore = localforage.createInstance({ + this.offlineEventStore = localForage.createInstance({ name: 'sentry/offlineEventStore', });