gruntjs: Fixed type of IExpandedFilesConfig.cwd

Changed type of IExpandedFilesConfig.cwd from boolean to string. Added
simple test for interface IExpandedFilesConfig as well.

fixes #4207
This commit is contained in:
CallMeTango 2015-04-30 18:00:45 +02:00
parent 00e7f3fede
commit 040d2efd5e
2 changed files with 12 additions and 2 deletions

View File

@ -68,7 +68,17 @@ exports = (grunt: IGrunt) => {
asyncedTwoArgs(2, "values", (result: string) => {
console.log(result);
});
var fileMaps = grunt.file.expandMapping([''], '', { ext: '.js' });
// tests for module grunt.file
var expandedFilesConfig: grunt.file.IExpandedFilesConfig = {
expand: true,
cwd: 'src',
src: ['**/*.ts'],
dest: 'build',
ext: '.js',
flatten: false
};
var fileMaps = grunt.file.expandMapping([''], '', expandedFilesConfig);
fileMaps.length;
fileMaps[0].src.length;
fileMaps[0].dest;

View File

@ -604,7 +604,7 @@ declare module grunt {
/**
* All {@link IExpandedFilesConfig.src} matches are relative to (but don't include) this path.
*/
cwd?: boolean
cwd?: string
/**
* Replace any existing extension with this value in generated {@link IExpandedFilesConfig.dest} paths.