Skip to content

ref: Use allowSyntheticDefaultImports for integrations to fix localforage types #3180

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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
6 changes: 2 additions & 4 deletions packages/integrations/src/offline.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
/* 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';
import localForage from 'localforage';

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