-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsource-map-support.d.ts
40 lines (35 loc) · 1.16 KB
/
source-map-support.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Type definitions for source-map-support 0.2.10
// Project: https://github.com/evanw/source-map-support
// Definitions by: Bart van der Schoor <https://github.com/Bartvds>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/**
* Output of retrieveSourceMap().
*/
export interface UrlAndMap {
url: string;
map: string | Buffer;
}
/**
* Options to install().
*/
export interface Options {
environment?: 'node' | 'browser' | 'auto';
handleUncaughtExceptions?: boolean;
emptyCacheBetweenOperations?: boolean;
retrieveFile?: (path: string) => string | null | undefined;
retrieveSourceMap?: (source: string) => UrlAndMap | null | undefined;
}
export interface Position {
source: string;
line: number;
column: number;
}
export function wrapCallSite (frame: any /* StackFrame */): any /* StackFrame */;
export function getErrorSource (error: Error): string;
export function mapSourcePosition (position: Position): Position;
export function retrieveSourceMap (source: string): UrlAndMap;
/**
* Install SourceMap support.
* @param options Can be used to e.g. disable uncaughtException handler.
*/
export function install (options?: Options): void;