diff --git a/gulp/gulp.d.ts b/gulp/gulp.d.ts index 908fc4c27..d12c3edc1 100644 --- a/gulp/gulp.d.ts +++ b/gulp/gulp.d.ts @@ -3,6 +3,8 @@ // Definitions by: Drew Noakes // Definitions: https://github.com/borisyankov/DefinitelyTyped +/// + declare module gulp { /** @@ -193,7 +195,7 @@ declare module gulp { * @param name the name of the task. Tasks that you want to run from the command line should not have spaces in them. * @param fn the function that performs the task's operations. Generally this takes the form of gulp.src().pipe(someplugin()). */ - task(name:string, fn:ITaskCallback): Gulp; + task(name:string, fn:ITaskCallback): any; /** * Define a task. @@ -202,7 +204,7 @@ declare module gulp { * @param dep an array of tasks to be executed and completed before your task will run. * @param fn the function that performs the task's operations. Generally this takes the form of gulp.src().pipe(someplugin()). */ - task(name:string, dep:string[], fn?:ITaskCallback): Gulp; + task(name:string, dep:string[], fn?:ITaskCallback): any; /** @@ -210,14 +212,14 @@ declare module gulp { * @param glob a glob string, using node-glob syntax * @param opt an optional option object */ - src(glob:string, opt?:ISrcOptions): Gulp; + src(glob:string, opt?:ISrcOptions): NodeJS.ReadWriteStream; /** * Takes a glob and represents a file structure. Can be piped to plugins. * @param glob an array of glob strings, using node-glob syntax * @param opt an optional option object */ - src(glob:string[], opt?:ISrcOptions): Gulp; + src(glob:string[], opt?:ISrcOptions): NodeJS.ReadWriteStream; /** @@ -227,7 +229,7 @@ declare module gulp { * @param outFolder the path (output folder) to write files to. * @param opt */ - dest(outFolder:string, opt?:IDestOptions): Gulp; + dest(outFolder:string, opt?:IDestOptions): NodeJS.ReadWriteStream; /** * Can be piped to and it will write files. Re-emits all data passed to it so you can pipe to multiple folders. @@ -236,16 +238,17 @@ declare module gulp { * @param outFolder a function that converts a vinyl File instance into an output path * @param opt */ - dest(outFolder:(file:string)=>string, opt?:IDestOptions): Gulp; + dest(outFolder:(file:string)=>string, opt?:IDestOptions): NodeJS.ReadWriteStream; /** - * Forwards the current Gulp instance, along with its contained files, to the specified receiver. + * Watch files and do something when a file changes. This always returns an EventEmitter that emits change events. * - * @param receiver the receiver + * @param glob a single glob or array of globs that indicate which files to watch for changes. + * @param tasks names of task(s) to run when a file changes, added with gulp.task() */ - pipe(receiver:any): Gulp; - + watch(glob:string, tasks:string[]): EventEmitter; + watch(glob:string[], tasks:string[]): EventEmitter; /** * Watch files and do something when a file changes. This always returns an EventEmitter that emits change events.