File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -5,19 +5,19 @@ import path from 'path';
5
5
6
6
const getComponentsByDir = makeGetComponentsByDir ( ) ;
7
7
8
- export function fetchList ( dirPath : string , callback : Callback < string [ ] > ) {
8
+ export function fetchList ( dirPath : string , callback : Callback < string [ ] > ) : void {
9
9
return getComponentsByDir ( dirPath , ( err , list ) => {
10
10
if ( err ) return ( callback as any ) ( err ) ;
11
11
if ( list . length === 0 ) return callback ( null , [ ] ) ;
12
12
13
13
const toRemove = list . map ( folder => path . join ( folder , 'node_modules' ) ) ;
14
- const folderExists = ( folder , cb ) =>
14
+ const folderExists = ( folder : string , cb : Callback < boolean > ) =>
15
15
fs . exists ( folder , exists => cb ( null , exists ) ) ;
16
16
17
17
async . filterSeries ( toRemove , folderExists , callback as any ) ;
18
18
} ) ;
19
19
}
20
20
21
- export function remove ( list : string [ ] , callback : Callback < string > ) {
21
+ export function remove ( list : string [ ] , callback : Callback < string > ) : void {
22
22
return async . eachSeries ( list , fs . remove , callback as any ) ;
23
23
}
You can’t perform that action at this time.
0 commit comments