1 | # Installation
|
2 | > `npm install --save @types/istanbul-lib-source-maps`
|
3 |
|
4 | # Summary
|
5 | This package contains type definitions for istanbul-lib-source-maps (https://istanbul.js.org).
|
6 |
|
7 | # Details
|
8 | Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/istanbul-lib-source-maps.
|
9 | ## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/istanbul-lib-source-maps/index.d.ts)
|
10 | ````ts
|
11 | import { CoverageMap } from "istanbul-lib-coverage";
|
12 | import { RawSourceMap } from "source-map";
|
13 |
|
14 | export function createSourceMapStore(options?: Partial<MapStoreOptions>): MapStore;
|
15 |
|
16 | export interface MapStoreOptions {
|
17 | verbose: boolean;
|
18 | baseDir: string;
|
19 | sourceStore: "memory" | "file";
|
20 | tmpdir: string;
|
21 | }
|
22 |
|
23 | export interface MapStore {
|
24 | baseDir: string | null;
|
25 | verbose: boolean;
|
26 | sourceStore: SourceStore;
|
27 | data: {
|
28 | [filepath: string]: {
|
29 | type: string;
|
30 | data: any;
|
31 | };
|
32 | };
|
33 |
|
34 | registerURL(transformedFilePath: string, sourceMapUrl: string): void;
|
35 | registerMap(filename: string, sourceMap: RawSourceMap): void;
|
36 | getSourceMapSync(filePath: string): any;
|
37 | addInputSourceMapsSync(coverageData: any): void;
|
38 | sourceFinder(filePath: string): string;
|
39 | transformCoverage(coverageMap: CoverageMap): Promise<CoverageMap>;
|
40 | dispose(): void;
|
41 | }
|
42 |
|
43 | export class SourceStore {
|
44 | getSource(filepath: string): string | null;
|
45 | registerSource(filepath: string, sourceText: string): void;
|
46 | }
|
47 |
|
48 | ````
|
49 |
|
50 | ### Additional Details
|
51 | * Last updated: Tue, 07 Nov 2023 03:09:37 GMT
|
52 | * Dependencies: [@types/istanbul-lib-coverage](https://npmjs.com/package/@types/istanbul-lib-coverage), [source-map](https://npmjs.com/package/source-map)
|
53 |
|
54 | # Credits
|
55 | These definitions were written by [Jason Cheatham](https://github.com/jason0x43), and [Sridhar Mallela](https://github.com/sridharmallela).
|
56 |
|
\ | No newline at end of file |