DefinitelyTyped/types/istanbul-lib-source-maps/index.d.ts
Nathan Shively-Sanders 8b4ae33bfa
Cleanup 20190425 (#34995)
* Update project urls

* remove jquery-notifier, update react-test-renderer

1. jquery-notifier was types for a type-only package.
2. react-test-renderer's test incorrectly assumed that <t> was an html
tag. This is now an error. I updated the test to use <div>, since that's
a tag I've heard of before.

* Fix space lint

* Use typescript for removing non-npm package

* Reorder names in notNeededpackages.json

* Point to real version of typescript
2019-04-25 16:05:15 -07:00

44 lines
1.1 KiB
TypeScript

// Type definitions for istanbul-lib-source-maps 1.2
// Project: https://istanbul.js.org, https://github.com/istanbuljs/istanbuljs
// Definitions by: Jason Cheatham <https://github.com/jason0x43>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.4
import { CoverageMap } from 'istanbul-lib-coverage';
import { RawSourceMap } from 'source-map';
export function createSourceMapStore(
options?: Partial<MapStoreOptions>
): MapStore;
export interface MapStoreOptions {
verbose: boolean;
baseDir: string;
sourceStore: 'memory' | 'file';
tmpdir: string;
}
export interface MapStore {
baseDir: string | null;
verbose: boolean;
sourceStore: SourceStore;
data: {
[filepath: string]: {
type: string;
data: any;
};
};
registerURL(transformedFilePath: string, sourceMapUrl: string): void;
registerMap(filename: string, sourceMap: RawSourceMap): void;
transformCoverage(
coverageMap: CoverageMap
): { map: CoverageMap; sourceFinder(path: string): string };
dispose(): void;
}
export class SourceStore {
getSource(filepath: string): string | null;
registerSource(filepath: string, sourceText: string): void;
}