diff --git a/types/grunt/grunt-tests.ts b/types/grunt/grunt-tests.ts index 5dd6550582..94eb12a46f 100644 --- a/types/grunt/grunt-tests.ts +++ b/types/grunt/grunt-tests.ts @@ -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) { }); }); -}; \ No newline at end of file +}; + + +let myTest = function (grunt: IGrunt) { + grunt.file.expand(['*.ts']); + grunt.file.expand('*.ts'); +} diff --git a/types/grunt/index.d.ts b/types/grunt/index.d.ts index 34e5b7e3cb..5187e5e965 100644 --- a/types/grunt/index.d.ts +++ b/types/grunt/index.d.ts @@ -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[]; /**