UNPKG

881 BTypeScriptView Raw
1export type InstrumentHandlerType = 'console' | 'dom' | 'fetch' | 'history' | 'xhr' | 'error' | 'unhandledrejection';
2export type InstrumentHandlerCallback = (data: any) => void;
3/** Add a handler function. */
4export declare function addHandler(type: InstrumentHandlerType, handler: InstrumentHandlerCallback): void;
5/**
6 * Reset all instrumentation handlers.
7 * This can be used by tests to ensure we have a clean slate of instrumentation handlers.
8 */
9export declare function resetInstrumentationHandlers(): void;
10/** Maybe run an instrumentation function, unless it was already called. */
11export declare function maybeInstrument(type: InstrumentHandlerType, instrumentFn: () => void): void;
12/** Trigger handlers for a given instrumentation type. */
13export declare function triggerHandlers(type: InstrumentHandlerType, data: unknown): void;
14//# sourceMappingURL=handlers.d.ts.map
\No newline at end of file