UNPKG

@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

37 lines (36 loc) 1.61 kB
import { SourceMapConsumer, NullableMappedPosition } from 'source-map'; import { BaseModel } from './BaseModel'; import { UnifiedPath } from '../system/UnifiedPath'; import { ISourceMap } from '../types/model/SourceMap'; export type SourceMapRedirect = { type: 'redirect'; sourceMapLocation: UnifiedPath; }; export declare class SourceMap extends BaseModel implements ISourceMap { private _consumer; private _numberOfLinesInCompiledFile; sourceMapLocation: UnifiedPath; version: number; file?: string; sourceRoot?: string; sources: (string | null)[]; sourcesContent?: (string | null)[]; names?: string[]; mappings: string; ignoreList?: number[]; constructor(sourceMapLocation: UnifiedPath, { version, file, sourceRoot, sources, sourcesContent, names, mappings, ignoreList }: ISourceMap); numberOfLinesInCompiledFile(): Promise<number>; copy(): SourceMap; toJSON(): ISourceMap; static fromJSON(json: string | ISourceMap): SourceMap; static fromJsonString(s: string, sourceMapLocation: UnifiedPath): SourceMap | null; static isSourceMap(sourceMapCandidate: object | null): boolean; static base64StringCompiledJSString(sourceCode: string): { base64: string | null | undefined; sourceMapUrl: string; } | null; static fromCompiledJSString(filePath: UnifiedPath, sourceCode: string): SourceMap | null | SourceMapRedirect; toBase64String(): string; asConsumer(): Promise<SourceMapConsumer>; getOriginalSourceLocation(line: number, column: number): Promise<NullableMappedPosition | undefined>; }