@@ -95,7 +95,7 @@ export function titleCase(str: string) {
9595}
9696
9797
98- export function writeFileAsync ( filePath : string , content : string ) : Promise < any > {
98+ export function writeFileAsync ( filePath : string , content : string ) {
9999 return new Promise ( ( resolve , reject ) => {
100100 writeFile ( filePath , content , ( err ) => {
101101 if ( err ) {
@@ -106,8 +106,8 @@ export function writeFileAsync(filePath: string, content: string): Promise<any>
106106 } ) ;
107107}
108108
109- export function readFileAsync ( filePath : string ) : Promise < string > {
110- return new Promise ( ( resolve , reject ) => {
109+ export function readFileAsync ( filePath : string ) {
110+ return new Promise < string > ( ( resolve , reject ) => {
111111 readFile ( filePath , 'utf-8' , ( err , buffer ) => {
112112 if ( err ) {
113113 return reject ( err ) ;
@@ -128,7 +128,7 @@ export function readAndCacheFile(filePath: string, purge: boolean = false): Prom
128128 } ) ;
129129}
130130
131- export function unlinkAsync ( filePath : string | string [ ] ) : Promise < any > {
131+ export function unlinkAsync ( filePath : string | string [ ] ) {
132132 let filePaths : string [ ] ;
133133
134134 if ( typeof filePath === 'string' ) {
@@ -140,7 +140,7 @@ export function unlinkAsync(filePath: string|string[]): Promise<any> {
140140 }
141141
142142 let promises = filePaths . map ( filePath => {
143- return new Promise ( ( resolve , reject ) => {
143+ return new Promise < void > ( ( resolve , reject ) => {
144144 unlink ( filePath , ( err : Error ) => {
145145 if ( err ) {
146146 return reject ( err ) ;
@@ -153,8 +153,8 @@ export function unlinkAsync(filePath: string|string[]): Promise<any> {
153153 return Promise . all ( promises ) ;
154154}
155155
156- export function rimRafAsync ( directoryPath : string ) : Promise < null > {
157- return new Promise ( ( resolve , reject ) => {
156+ export function rimRafAsync ( directoryPath : string ) {
157+ return new Promise < void > ( ( resolve , reject ) => {
158158 remove ( directoryPath , ( err : Error ) => {
159159 if ( err ) {
160160 return reject ( err ) ;
@@ -164,8 +164,8 @@ export function rimRafAsync(directoryPath: string): Promise<null> {
164164 } ) ;
165165}
166166
167- export function copyFileAsync ( srcPath : string , destPath : string ) : Promise < any > {
168- return new Promise ( ( resolve , reject ) => {
167+ export function copyFileAsync ( srcPath : string , destPath : string ) {
168+ return new Promise < void > ( ( resolve , reject ) => {
169169 const writeStream = createWriteStream ( destPath ) ;
170170
171171 writeStream . on ( 'error' , ( err : Error ) => {
@@ -180,8 +180,8 @@ export function copyFileAsync(srcPath: string, destPath: string): Promise<any> {
180180 } ) ;
181181}
182182
183- export function readDirAsync ( pathToDir : string ) : Promise < string [ ] > {
184- return new Promise ( ( resolve , reject ) => {
183+ export function readDirAsync ( pathToDir : string ) {
184+ return new Promise < string [ ] > ( ( resolve , reject ) => {
185185 readdir ( pathToDir , ( err : Error , fileNames : string [ ] ) => {
186186 if ( err ) {
187187 return reject ( err ) ;
0 commit comments