forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
source-map-support.d.ts
43 lines (37 loc) · 1.17 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
41
42
43
// 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
/// <reference path="../node/node.d.ts" />
declare module 'source-map-support' {
/**
* Output of retrieveSourceMap().
*/
export interface UrlAndMap {
url: string;
map: string|Buffer;
}
/**
* Options to install().
*/
export interface Options {
handleUncaughtExceptions?: boolean;
emptyCacheBetweenOperations?: boolean;
retrieveFile?: (path: string) => string;
retrieveSourceMap?: (source: string) => UrlAndMap;
}
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;
}