Skip to content
This repository has been archived by the owner on May 23, 2022. It is now read-only.

Use allowSyntheticDefaultImports for integrations to fix localforage … #1

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions packages/integrations/src/offline.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
import { Event, EventProcessor, Hub, Integration } from '@sentry/types';
import { getGlobalObject, logger, uuid4 } from '@sentry/utils';
import * as localForageType from 'localforage';

// eslint-disable-next-line @typescript-eslint/no-var-requires
const localForage = require('localforage');
import localForage from 'localforage';
/**
* cache offline errors and send when connected
*/
Expand Down Expand Up @@ -38,7 +35,7 @@ export class Offline implements Integration {
/**
* event cache
*/
public offlineEventStore: typeof localForageType; // type imported from localforage
public offlineEventStore: LocalForage; // type imported from localforage

/**
* @inheritDoc
Expand Down
1 change: 1 addition & 0 deletions packages/integrations/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"allowSyntheticDefaultImports": true,
"declarationMap": false,
"baseUrl": ".",
"outDir": "dist",
Expand Down
1 change: 1 addition & 0 deletions packages/integrations/tsconfig.esm.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"extends": "../../tsconfig.esm.json",
"compilerOptions": {
"allowSyntheticDefaultImports": true,
"declarationMap": false,
"baseUrl": ".",
"outDir": "esm",
Expand Down