fixing file.expand typing

This commit is contained in:
Holger Jeromin
2018-05-23 15:58:57 +02:00
parent d11cc3b1a2
commit 8157193c26
2 changed files with 10 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
// Official code sample from
// Official code sample from
// http://gruntjs.com/getting-started#an-example-gruntfile
interface MyTaskData {
@@ -12,7 +12,7 @@ interface MyOptions {
repeat: number;
}
// exports should work same as module.exports
// exports should work same as module.exports
exports = (grunt: IGrunt) => {
// Project configuration.
@@ -126,4 +126,10 @@ exports.exports = function(grunt: IGrunt) {
});
});
};
};
let myTest = function (grunt: IGrunt) {
grunt.file.expand(['*.ts']);
grunt.file.expand('*.ts');
}

View File

@@ -445,7 +445,7 @@ declare namespace grunt {
* File paths are relative to the Gruntfile unless the current working directory is changed with
* grunt.file.setBase or the --base command-line option.
*/
expand(patterns: string[]): string[];
expand(patterns: string | string[]): string[];
expand(options: IFilesConfig, patterns: string[]): string[];
/**