From e3882dcab88e258736e2e36fc4e61ef7d92d0429 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Morch=C3=B3n=20Poveda?= Date: Mon, 23 Feb 2015 12:47:24 +0100 Subject: [PATCH 1/2] Update gruntjs.d.ts From http://gruntjs.com/api/grunt.task#grunt.task.exists --- gruntjs/gruntjs.d.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gruntjs/gruntjs.d.ts b/gruntjs/gruntjs.d.ts index 7de19d016c..ff672d3688 100644 --- a/gruntjs/gruntjs.d.ts +++ b/gruntjs/gruntjs.d.ts @@ -790,6 +790,12 @@ declare module grunt { */ registerMultiTask(taskName: string, taskFunction: Function): void registerMultiTask(taskName: string, taskDescription: string, taskFunction: Function): void + + /** + * Check with the name, if a task exists in the registered tasks. + * @since 0.4.5 + */ + exists(name: string): boolean; } /** From 2c48e5c514a15a48ebfff860fc6f051a943d7605 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Morch=C3=B3n=20Poveda?= Date: Mon, 23 Feb 2015 12:55:09 +0100 Subject: [PATCH 2/2] Update gruntjs.d.ts From http://gruntjs.com/api/grunt.task#grunt.task.renametask --- gruntjs/gruntjs.d.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gruntjs/gruntjs.d.ts b/gruntjs/gruntjs.d.ts index ff672d3688..baea9dcfb7 100644 --- a/gruntjs/gruntjs.d.ts +++ b/gruntjs/gruntjs.d.ts @@ -793,9 +793,19 @@ declare module grunt { /** * Check with the name, if a task exists in the registered tasks. + * @param name The task name to check. * @since 0.4.5 */ exists(name: string): boolean; + + /** + * Rename a task. This might be useful if you want to override the default behavior of a task, while retaining the old name. + * Note that if a task has been renamed, the this.name and this.nameArgs properties will change accordingly. + * @see ITask + * @param oldname The previous name of the task. + * @param newname The new name for the task. + */ + renameTask(oldname: string, newname: string): void } /**