1 | import { CoverageMap } from "istanbul-lib-coverage";
|
2 | import { RawSourceMap } from "source-map";
|
3 |
|
4 | export function createSourceMapStore(options?: Partial<MapStoreOptions>): MapStore;
|
5 |
|
6 | export interface MapStoreOptions {
|
7 | verbose: boolean;
|
8 | baseDir: string;
|
9 | sourceStore: "memory" | "file";
|
10 | tmpdir: string;
|
11 | }
|
12 |
|
13 | export interface MapStore {
|
14 | baseDir: string | null;
|
15 | verbose: boolean;
|
16 | sourceStore: SourceStore;
|
17 | data: {
|
18 | [filepath: string]: {
|
19 | type: string;
|
20 | data: any;
|
21 | };
|
22 | };
|
23 |
|
24 | registerURL(transformedFilePath: string, sourceMapUrl: string): void;
|
25 | registerMap(filename: string, sourceMap: RawSourceMap): void;
|
26 | getSourceMapSync(filePath: string): any;
|
27 | addInputSourceMapsSync(coverageData: any): void;
|
28 | sourceFinder(filePath: string): string;
|
29 | transformCoverage(coverageMap: CoverageMap): Promise<CoverageMap>;
|
30 | dispose(): void;
|
31 | }
|
32 |
|
33 | export class SourceStore {
|
34 | getSource(filepath: string): string | null;
|
35 | registerSource(filepath: string, sourceText: string): void;
|
36 | }
|