forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulp-task-listing.d.ts
40 lines (35 loc) · 1.61 KB
/
gulp-task-listing.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Type definitions for gulp-task-listing
// Project: https://github.com/OverZealous/gulp-task-listing
// Definitions by: Joe Skeen <http://github.com/joeskeen>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/**
* Provides an easy way to get a listing of your tasks from your gulpfile. By default, the
* output groups tasks based on whether or not they contain a hyphen (-), underscore (_),
* or colon (:) in their name.
*
* You can optionally override the Regexp used to determine whether a task is a primary or
* subtask, as well as filter out tasks you don't want to see in the output.
*/
declare module 'gulp-task-listing' {
/**
* Provides an easy way to get a listing of your tasks from your gulpfile. By default, the
* output groups tasks based on whether or not they contain a hyphen (-), underscore (_),
* or colon (:) in their name.
*
* You can optionally override the Regexp used to determine whether a task is a primary or
* subtask, as well as filter out tasks you don't want to see in the output.
*/
interface GulpTaskListing {
(cb: Function): void;
/**
* Allows for custom filtering of Gulp tasks in the listing
*
* @param subTaskFilter a RegExp or Function returning whether the given task is a subtask
* @param excludeFilter a RegExp or Function returning whether the given task should be excluded from the listing
*/
withFilters(subTaskFilter: RegExp | FilterFunction, excludeFilter?: RegExp | FilterFunction): (cb: Function) => void;
}
type FilterFunction = (task: string) => boolean;
var gulpTaskListing: GulpTaskListing;
export = gulpTaskListing;
}