@oaklean/profiler-core
Version:
Part of the @oaklean suite. It provides all basic functions to work with the `.oak` file format. It allows parsing the `.oak` file format as well as tools for analyzing the measurement values. It also provides all necessary capabilities required for prec
30 lines (29 loc) • 1.42 kB
TypeScript
import { SourceMapConsumer, MappedPosition } from 'source-map';
import { BaseModel } from './BaseModel';
import { UnifiedPath } from '../system/UnifiedPath';
export interface ISourceMap {
version: number;
sources: string[];
names: string[];
mappings: string;
}
export declare class SourceMap extends BaseModel implements ISourceMap {
private _consumer;
private _numberOfLinesInCompiledFile;
compiledFileLocation: UnifiedPath;
sourceMapLocation: UnifiedPath;
version: number;
sources: string[];
names: string[];
mappings: string;
constructor(compiledFileLocation: UnifiedPath, sourceMapLocation: UnifiedPath, version: number, sources: UnifiedPath[], names: string[], mappings: string);
get numberOfLinesInCompiledFile(): number;
toJSON(): ISourceMap;
static fromJSON(json: string | ISourceMap): SourceMap;
static fromJsonString(s: string, sourceMapLocation: UnifiedPath, compiledFileLocation: UnifiedPath, numberOfLinesInCompiledFile: number): SourceMap | undefined;
static isSourceMap(sourceMapCandidate: object | undefined): boolean;
static fromCompiledJSString(filePath: UnifiedPath, sourceCode: string): SourceMap | undefined;
static fromCompiledJSFile(filePath: UnifiedPath): SourceMap | undefined;
asConsumer(): SourceMapConsumer;
getOriginalSourceLocation(lineNumber: number, columnNumber: number): MappedPosition | undefined;
}