UNPKG

1.28 kBTypeScriptView Raw
1/// <reference types="node"/>
2
3import File = require("vinyl");
4
5interface InitOptions {
6 loadMaps?: boolean | undefined;
7 debug?: boolean | undefined;
8}
9
10interface WriteMapper {
11 (file: string): string;
12}
13
14interface SourceMapMapper {
15 (sourcePath: string, file: File): string;
16}
17
18interface SourceUrlMapper {
19 (file: File): string;
20}
21
22interface MapFilenameMapper {
23 (mapFilePath: string): string;
24}
25
26interface CloneOptions {
27 contents?: boolean | undefined;
28 deep?: boolean | undefined;
29}
30
31interface WriteOptions {
32 addComment?: boolean | undefined;
33 includeContent?: boolean | undefined;
34 sourceRoot?: string | WriteMapper | undefined;
35 sourceMappingURLPrefix?: string | WriteMapper | undefined;
36 sourceMappingURL?: SourceUrlMapper | undefined;
37 destPath?: string | undefined;
38 mapFile?: MapFilenameMapper | undefined;
39 charset?: BufferEncoding | undefined;
40 clone?: boolean | CloneOptions | undefined;
41}
42
43export declare function init(opts?: InitOptions): NodeJS.ReadWriteStream;
44export declare function mapSources(mapper?: SourceMapMapper): NodeJS.ReadWriteStream;
45export declare function write(path?: string, opts?: WriteOptions): NodeJS.ReadWriteStream;
46export declare function write(opts?: WriteOptions): NodeJS.ReadWriteStream;