File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -292,8 +292,9 @@ namespace Moduless
292
292
const passed = checkerFn ( ) ;
293
293
report ( passed , coverFunctionName , checkerText ) ;
294
294
}
295
- catch ( e )
295
+ catch ( err )
296
296
{
297
+ const e = err as Error ;
297
298
Util . error (
298
299
"Checker function: " + checkerText + " generated an error: \n" +
299
300
"\t" + e . name + ": " + e . message + "\r\n" +
@@ -302,7 +303,7 @@ namespace Moduless
302
303
}
303
304
304
305
/** */
305
- async function execCheckerAsync ( coverFunctionName : string , checkerFn : ( ) => boolean )
306
+ async function execCheckerAsync ( coverFunctionName : string , checkerFn : ( ) => Promise < boolean > )
306
307
{
307
308
const checkerText = checkerFn . toString ( ) . replace ( / ^ \s * \( \) \s * = > \s * / , "" ) ;
308
309
@@ -311,8 +312,9 @@ namespace Moduless
311
312
const passed = await checkerFn ( ) ;
312
313
report ( passed , coverFunctionName , checkerText ) ;
313
314
}
314
- catch ( e )
315
+ catch ( err )
315
316
{
317
+ const e = err as Error ;
316
318
Util . error (
317
319
"Checker function: " + checkerText + " generated an error: \n" +
318
320
"\t" + e . name + ": " + e . message + "\r\n" +
Original file line number Diff line number Diff line change @@ -4,8 +4,7 @@ namespace Moduless
4
4
/** */
5
5
function runFromCommandLine ( )
6
6
{
7
- const cli = require ( "cac" ) ( ) as
8
- ReturnType < typeof import ( "../node_modules/cac/types/index" ) . cac > ;
7
+ const cli = require ( "cac" ) ( ) ;
9
8
10
9
cli
11
10
. command ( "" , "Run the cover function that was set previously." )
You can’t perform that action at this time.
0 commit comments