UNPKG

2.07 kBMarkdownView Raw
1# Installation
2> `npm install --save @types/gulp-sourcemaps`
3
4# Summary
5This package contains type definitions for gulp-sourcemaps (https://github.com/gulp-sourcemaps/gulp-sourcemaps).
6
7# Details
8Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/gulp-sourcemaps.
9## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/gulp-sourcemaps/index.d.ts)
10````ts
11/// <reference types="node"/>
12
13import File = require("vinyl");
14
15interface InitOptions {
16 loadMaps?: boolean | undefined;
17 debug?: boolean | undefined;
18}
19
20interface WriteMapper {
21 (file: string): string;
22}
23
24interface SourceMapMapper {
25 (sourcePath: string, file: File): string;
26}
27
28interface SourceUrlMapper {
29 (file: File): string;
30}
31
32interface MapFilenameMapper {
33 (mapFilePath: string): string;
34}
35
36interface CloneOptions {
37 contents?: boolean | undefined;
38 deep?: boolean | undefined;
39}
40
41interface WriteOptions {
42 addComment?: boolean | undefined;
43 includeContent?: boolean | undefined;
44 sourceRoot?: string | WriteMapper | undefined;
45 sourceMappingURLPrefix?: string | WriteMapper | undefined;
46 sourceMappingURL?: SourceUrlMapper | undefined;
47 destPath?: string | undefined;
48 mapFile?: MapFilenameMapper | undefined;
49 charset?: BufferEncoding | undefined;
50 clone?: boolean | CloneOptions | undefined;
51}
52
53export declare function init(opts?: InitOptions): NodeJS.ReadWriteStream;
54export declare function mapSources(mapper?: SourceMapMapper): NodeJS.ReadWriteStream;
55export declare function write(path?: string, opts?: WriteOptions): NodeJS.ReadWriteStream;
56export declare function write(opts?: WriteOptions): NodeJS.ReadWriteStream;
57
58````
59
60### Additional Details
61 * Last updated: Tue, 07 Nov 2023 03:09:37 GMT
62 * Dependencies: [@types/node](https://npmjs.com/package/@types/node), [@types/vinyl](https://npmjs.com/package/@types/vinyl)
63
64# Credits
65These definitions were written by [Phips Peter](https://github.com/pspeter3), and [Concision](https://github.com/concision).
66
\No newline at end of file