mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-29 07:16:36 +01:00
e28db07a1b
* Set sentry autoTrackSessions default * endSession.... * fixup * updated comment * prevent breaking devmode * remove changes to beforeSend * remove additional usage of sinon
37 lines
1.1 KiB
TypeScript
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>;
|
|
}
|
|
}
|
|
}
|