-
Notifications
You must be signed in to change notification settings - Fork 43
/
index.d.ts
21 lines (18 loc) · 866 Bytes
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
declare module 'sourcemapped-stacktrace' {
export interface MapStackTraceOptions {
/** Filter function applied to each stackTrace line. Lines which do not pass the filter won't be processesd. */
filter?: (line: string) => boolean
/** Whether to cache sourcemaps globally across multiple calls. */
cacheGlobally?: boolean
/** Whether to use synchronous ajax to load the sourcemaps. */
sync?: boolean
}
/**
* Re-map entries in a stacktrace using sourcemaps if available.
*
* @param stack The stacktrace from the browser (`error.stack`).
* @param done Callback invoked with the transformed stacktrace.
* @param opts Options object.
*/
export function mapStackTrace(stack: string | undefined, done: (mappedStack: string[]) => void, opts?: MapStackTraceOptions): void
}