Skip to content

Commit 4311017

Browse files
committed
Merge pull request DefinitelyTyped#4236 from callmetango/grunt-IExpandedFilesConfig-fix-4207
gruntjs: Fixed type of IExpandedFilesConfig.cwd
2 parents fc41ac9 + 040d2ef commit 4311017

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

gruntjs/gruntjs-tests.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,17 @@ exports = (grunt: IGrunt) => {
6868
asyncedTwoArgs(2, "values", (result: string) => {
6969
console.log(result);
7070
});
71-
var fileMaps = grunt.file.expandMapping([''], '', { ext: '.js' });
71+
72+
// tests for module grunt.file
73+
var expandedFilesConfig: grunt.file.IExpandedFilesConfig = {
74+
expand: true,
75+
cwd: 'src',
76+
src: ['**/*.ts'],
77+
dest: 'build',
78+
ext: '.js',
79+
flatten: false
80+
};
81+
var fileMaps = grunt.file.expandMapping([''], '', expandedFilesConfig);
7282
fileMaps.length;
7383
fileMaps[0].src.length;
7484
fileMaps[0].dest;

gruntjs/gruntjs.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ declare module grunt {
604604
/**
605605
* All {@link IExpandedFilesConfig.src} matches are relative to (but don't include) this path.
606606
*/
607-
cwd?: boolean
607+
cwd?: string
608608

609609
/**
610610
* Replace any existing extension with this value in generated {@link IExpandedFilesConfig.dest} paths.

0 commit comments

Comments
 (0)