UNPKG

@sentry/browser

Version:
38 lines • 1.33 kB
import type { Client, HandlerDataError, Mechanism, WrappedFunction } from '@sentry/core'; import { GLOBAL_OBJ } from '@sentry/core'; export declare const WINDOW: typeof GLOBAL_OBJ & Window; type ErrorReport = Pick<HandlerDataError, 'msg' | 'url' | 'line' | 'column'>; /** * @hidden */ export declare function shouldIgnoreOnError(data?: HandlerDataError): boolean; /** * Skips the next `onerror` report that matches `report`, once. A report that * never arrives is forgotten after the current task. * * @hidden */ export declare function ignoreNextOnErrorMatching(report: ErrorReport): void; /** * @hidden */ export declare function ignoreNextOnError(): void; type WrappableFunction = Function; export declare function wrap<T extends WrappableFunction>(fn: T, options?: { mechanism?: Mechanism; }): WrappedFunction<T>; export declare function wrap<NonFunction>(fn: NonFunction, options?: { mechanism?: Mechanism; }): NonFunction; /** * Get HTTP request data from the current page. * * The `Referer` header has `dataCollection.urlQueryParams` of `client` applied. `url` is unfiltered, so * callers must pass it through `filterCollectedUrl`. */ export declare function getHttpRequestData(client: Client): { url: string; headers: Record<string, string>; }; export {}; //# sourceMappingURL=helpers.d.ts.map