mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-06 13:11:46 +00:00
Unwrap all lone ambient external modules
This commit is contained in:
Vendored
+33
-34
@@ -3,44 +3,43 @@
|
||||
// Definitions by: Rogier Schouten <https://github.com/rogierschouten>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare module "stack-mapper" {
|
||||
|
||||
namespace stackMapper {
|
||||
|
||||
export class StackMapper {
|
||||
declare namespace stackMapper {
|
||||
|
||||
/**
|
||||
* Maps the trace statements of the given error stack and replaces locations
|
||||
* referencing code in the generated file with the locations inside the original files.
|
||||
*
|
||||
* @name map
|
||||
* @function
|
||||
* @param {Array} array of callsite objects (see readme for details about Callsite object)
|
||||
* @return {Array.<Object>} info about the error stack with adapted locations, each with the following properties
|
||||
* - filename: original filename
|
||||
* - line: origial line in that filename of the trace
|
||||
* - column: origial column on that line of the trace
|
||||
*/
|
||||
public map(stack: Callsite[]): Callsite[];
|
||||
}
|
||||
export class StackMapper {
|
||||
|
||||
export interface Callsite {
|
||||
filename: string;
|
||||
line: number;
|
||||
column: number;
|
||||
}
|
||||
/**
|
||||
* Maps the trace statements of the given error stack and replaces locations
|
||||
* referencing code in the generated file with the locations inside the original files.
|
||||
*
|
||||
* @name map
|
||||
* @function
|
||||
* @param {Array} array of callsite objects (see readme for details about Callsite object)
|
||||
* @return {Array.<Object>} info about the error stack with adapted locations, each with the following properties
|
||||
* - filename: original filename
|
||||
* - line: origial line in that filename of the trace
|
||||
* - column: origial column on that line of the trace
|
||||
*/
|
||||
public map(stack: Callsite[]): Callsite[];
|
||||
}
|
||||
|
||||
}
|
||||
export interface Callsite {
|
||||
filename: string;
|
||||
line: number;
|
||||
column: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a Stackmapper that will use the given source map to map error trace locations.
|
||||
*
|
||||
* @name stackMapper
|
||||
* @function
|
||||
* @param {Object} sourcemap source map for the generated file
|
||||
* @return {StackMapper} stack mapper for the particular source map
|
||||
*/
|
||||
function stackMapper(sourcemap: any): stackMapper.StackMapper;
|
||||
|
||||
export = stackMapper;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a Stackmapper that will use the given source map to map error trace locations.
|
||||
*
|
||||
* @name stackMapper
|
||||
* @function
|
||||
* @param {Object} sourcemap source map for the generated file
|
||||
* @return {StackMapper} stack mapper for the particular source map
|
||||
*/
|
||||
declare function stackMapper(sourcemap: any): stackMapper.StackMapper;
|
||||
|
||||
export = stackMapper;
|
||||
|
||||
Reference in New Issue
Block a user