1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-24 19:10:22 +01:00
metamask-extension/types/global.d.ts
Brad Decker e28db07a1b
Set sentry autoTrackSessions default (#20132)
* Set sentry autoTrackSessions default

* endSession....

* fixup

* updated comment

* prevent breaking devmode

* remove changes to beforeSend

* remove additional usage of sinon
2023-07-26 07:13:28 -05:00

37 lines
1.1 KiB
TypeScript

// In order for variables to be considered on the global scope they must be
// declared using var and not const or let, which is why this rule is disabled
/* eslint-disable no-var */
import * as Sentry from '@sentry/browser';
declare class Platform {
openTab: (opts: { url: string }) => void;
closeCurrentWindow: () => void;
}
declare class SentryObject extends Sentry {
// Verifies that the user has opted into metrics and then updates the sentry
// instance to track sessions and begins the session.
startSession: () => void;
// Verifies that the user has opted out of metrics and then updates the
// sentry instance to NOT track sessions and ends the current session.
endSession: () => void;
// Calls either startSession or endSession based on optin status
toggleSession: () => void;
}
export declare global {
var platform: Platform;
// Sentry is undefined in dev, so use optional chaining
var sentry: SentryObject | undefined;
namespace jest {
interface Matchers<R> {
toBeFulfilled(): Promise<R>;
toNeverResolve(): Promise<R>;
}
}
}