forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request DefinitelyTyped#2504 from poelstra/master
Expand typings for source-map-support.
- Loading branch information
Showing
2 changed files
with
71 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,41 @@ | ||
// Type definitions for source-map-support 0.2.5 | ||
// Type definitions for source-map-support 0.2.6 | ||
// Project: https://github.com/evanw/source-map-support | ||
// Definitions by: Bart van der Schoor <https://github.com/Bartvds> | ||
// Definitions: https://github.com/borisyankov/DefinitelyTyped | ||
|
||
declare module 'source-map-support' { | ||
export function install(): any; | ||
/** | ||
* Output of retrieveSourceMap(). | ||
*/ | ||
export interface UrlAndMap { | ||
url: string; | ||
map: any; // string or 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; | ||
} |