Merge pull request #1722 from Bartvds/def/gruntjs

Fixed gruntjs done() callback signature
This commit is contained in:
Basarat Ali Syed
2014-02-23 09:04:23 +11:00
2 changed files with 17 additions and 5 deletions
+13 -2
View File
@@ -42,9 +42,20 @@ exports = (grunt: IGrunt) => {
var valid = false;
valid = valid && options.sourceRoot === "default";
valid = valid && currenttask.data.repeat > 0;
return valid;
var done = this.async();
done();
});
grunt.registerMultiTask('task-1', "", function() {
var done = this.async();
done(new Error('nope'));
});
grunt.registerMultiTask('task-2', "", function() {
var done = this.async();
done(false);
});
// util methods
var testOneArg = (a: number) => a * 2;
@@ -61,4 +72,4 @@ exports = (grunt: IGrunt) => {
fileMaps.length;
fileMaps[0].src.length;
fileMaps[0].dest;
};
};
+4 -3
View File
@@ -816,9 +816,10 @@ declare module grunt {
* Either false or an Error object may be passed to the done function
* to instruct Grunt that the task has failed.
*/
done(success: boolean): void;
done(error: Error): void;
done(result: any): void;
(success: boolean): void;
(error: Error): void;
(result: any): void;
(): void;
}
/**