mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Function type for callback
This commit is contained in:
+2
-2
@@ -22,14 +22,14 @@ declare module 'gulp-task-listing' {
|
||||
* subtask, as well as filter out tasks you don't want to see in the output.
|
||||
*/
|
||||
interface GulpTaskListing {
|
||||
(cb): void;
|
||||
(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) => void;
|
||||
withFilters(subTaskFilter: RegExp | FilterFunction, excludeFilter?: RegExp | FilterFunction): (cb: Function) => void;
|
||||
}
|
||||
|
||||
type FilterFunction = (task: string) => boolean;
|
||||
|
||||
Reference in New Issue
Block a user