UNPKG

2.51 kBTypeScriptView Raw
1import type { browserTracingIntegration } from '@sentry-internal/tracing';
2import type { DsnLike, Integration, Mechanism, WrappedFunction } from '@sentry/types';
3export declare const WINDOW: import("@sentry/utils").InternalGlobal & Window;
4/**
5 * @hidden
6 */
7export declare function shouldIgnoreOnError(): boolean;
8/**
9 * @hidden
10 */
11export declare function ignoreNextOnError(): void;
12/**
13 * Instruments the given function and sends an event to Sentry every time the
14 * function throws an exception.
15 *
16 * @param fn A function to wrap. It is generally safe to pass an unbound function, because the returned wrapper always
17 * has a correct `this` context.
18 * @returns The wrapped function.
19 * @hidden
20 */
21export declare function wrap(fn: WrappedFunction, options?: {
22 mechanism?: Mechanism;
23}, before?: WrappedFunction): any;
24/**
25 * All properties the report dialog supports
26 *
27 * @deprecated This type will be removed in the next major version of the Sentry SDK. `showReportDialog` will still be around, however the `eventId` option will now be required.
28 */
29export interface ReportDialogOptions {
30 [key: string]: any;
31 eventId?: string;
32 dsn?: DsnLike;
33 user?: {
34 email?: string;
35 name?: string;
36 };
37 lang?: string;
38 title?: string;
39 subtitle?: string;
40 subtitle2?: string;
41 labelName?: string;
42 labelEmail?: string;
43 labelComments?: string;
44 labelClose?: string;
45 labelSubmit?: string;
46 errorGeneric?: string;
47 errorFormEntry?: string;
48 successMessage?: string;
49 /** Callback after reportDialog showed up */
50 onLoad?(this: void): void;
51 /** Callback after reportDialog closed */
52 onClose?(this: void): void;
53}
54/**
55 * This is a slim shim of `browserTracingIntegration` for the CDN bundles.
56 * Since the actual functional integration uses a different code from `BrowserTracing`,
57 * we want to avoid shipping both of them in the CDN bundles, as that would blow up the size.
58 * Instead, we provide a functional integration with the same API, but the old implementation.
59 * This means that it's not possible to register custom routing instrumentation, but that's OK for now.
60 * We also don't expose the utilities for this anyhow in the CDN bundles.
61 * For users that need custom routing in CDN bundles, they have to continue using `new BrowserTracing()` until v8.
62 */
63export declare function bundleBrowserTracingIntegration(options?: Parameters<typeof browserTracingIntegration>[0]): Integration;
64//# sourceMappingURL=helpers.d.ts.map
\No newline at end of file