UNPKG

2.28 kBMarkdownView Raw
1# Installation
2> `npm install --save @types/gulp-plumber`
3
4# Summary
5This package contains type definitions for gulp-plumber (https://github.com/floatdrop/gulp-plumber).
6
7# Details
8Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/gulp-plumber.
9## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/gulp-plumber/index.d.ts)
10````ts
11/// <reference types="node" />
12
13/** Prevent pipe breaking caused by errors from gulp plugins */
14
15/** Prevent pipe breaking caused by errors from gulp plugins */
16interface GulpPlumber {
17 /**
18 * Returns Stream, that fixes pipe methods on Streams that are next in pipeline.
19 *
20 * @param options Sets options as described in the Options interface
21 */
22 (options?: Options): NodeJS.ReadWriteStream;
23 /**
24 * Returns Stream, that fixes pipe methods on Streams that are next in pipeline.
25 *
26 * @param errorHandler the function to be attached to the stream on('error')
27 */
28 (errorHandler: ErrorHandlerFunction): NodeJS.ReadWriteStream;
29 /** returns default behaviour for pipeline after it was piped */
30 stop(): NodeJS.ReadWriteStream;
31}
32
33interface Options {
34 /**
35 * Handle errors in underlying streams and output them to console. Default true.
36 * If function passed, it will be attached to stream on('error')
37 * If false passed, error handler will not be attached
38 * If undefined passed, default error handler will be attached
39 */
40 errorHandler?: ErrorHandlerFunction | boolean | undefined;
41 /** Monkeypatch pipe functions in underlying streams in pipeline. Default true. */
42 inherit?: boolean | undefined;
43}
44
45/** an error handler function to be attached to the stream on('error') */
46interface ErrorHandlerFunction {
47 /** an error handler function to be attached to the stream on('error') */
48 (error: any): void;
49}
50
51/** Prevent pipe breaking caused by errors from gulp plugins */
52declare var gulpPlumber: GulpPlumber;
53
54export = gulpPlumber;
55
56````
57
58### Additional Details
59 * Last updated: Tue, 07 Nov 2023 03:09:37 GMT
60 * Dependencies: [@types/node](https://npmjs.com/package/@types/node)
61
62# Credits
63These definitions were written by [Joe Skeen](https://github.com/joeskeen).
64
\No newline at end of file