mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
define interface for 'this' object when executing a task
This commit is contained in:
Vendored
+38
-1
@@ -175,9 +175,46 @@ interface IGruntFileObject {
|
||||
findup: any;
|
||||
}
|
||||
|
||||
////////////////
|
||||
// 'this' when executing within a task
|
||||
// http://gruntjs.com/api/inside-tasks
|
||||
////////////////
|
||||
interface IGruntTaskThis {
|
||||
async(): (err:any) => void;
|
||||
requires(...taskNames: string[]): void;
|
||||
requiresConfig(...props: string[]): void;
|
||||
name: string;
|
||||
nameArgs: string;
|
||||
args: string[];
|
||||
flags: any;
|
||||
errorCount: number;
|
||||
options(defaults?: Object): any;
|
||||
}
|
||||
|
||||
////////////////
|
||||
// 'this' when executing within a multitask
|
||||
// http://gruntjs.com/api/inside-tasks
|
||||
////////////////
|
||||
interface IGruntMultiTaskThis extends IGruntTaskThis {
|
||||
target: string;
|
||||
files: IGruntFileArray[];
|
||||
filesSrc: string[];
|
||||
data: any;
|
||||
}
|
||||
|
||||
////////////////
|
||||
// Files array format
|
||||
// http://gruntjs.com/configuring-tasks#files-array-format
|
||||
////////////////
|
||||
interface IGruntFileArray {
|
||||
src: string[];
|
||||
dest: string;
|
||||
nonull?: boolean;
|
||||
filter?: any;
|
||||
}
|
||||
|
||||
////////////////
|
||||
/// Globally called export function module.exports
|
||||
////////////////
|
||||
|
||||
declare var exports: (grunt: IGrunt) => void;
|
||||
declare var exports: (grunt: IGrunt) => void;
|
||||
|
||||
Reference in New Issue
Block a user