Skip to content

Commit 11537ff

Browse files
committed
Fixes compilation issues
1 parent 5108614 commit 11537ff

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

core/Run.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -292,8 +292,9 @@ namespace Moduless
292292
const passed = checkerFn();
293293
report(passed, coverFunctionName, checkerText);
294294
}
295-
catch (e)
295+
catch (err)
296296
{
297+
const e = err as Error;
297298
Util.error(
298299
"Checker function: " + checkerText + " generated an error: \n" +
299300
"\t" + e.name + ": " + e.message + "\r\n" +
@@ -302,7 +303,7 @@ namespace Moduless
302303
}
303304

304305
/** */
305-
async function execCheckerAsync(coverFunctionName: string, checkerFn: () => boolean)
306+
async function execCheckerAsync(coverFunctionName: string, checkerFn: () => Promise<boolean>)
306307
{
307308
const checkerText = checkerFn.toString().replace(/^\s*\(\)\s*=>\s*/, "");
308309

@@ -311,8 +312,9 @@ namespace Moduless
311312
const passed = await checkerFn();
312313
report(passed, coverFunctionName, checkerText);
313314
}
314-
catch (e)
315+
catch (err)
315316
{
317+
const e = err as Error;
316318
Util.error(
317319
"Checker function: " + checkerText + " generated an error: \n" +
318320
"\t" + e.name + ": " + e.message + "\r\n" +

core/Zenith.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ namespace Moduless
44
/** */
55
function runFromCommandLine()
66
{
7-
const cli = require("cac")() as
8-
ReturnType<typeof import("../node_modules/cac/types/index").cac>;
7+
const cli = require("cac")();
98

109
cli
1110
.command("", "Run the cover function that was set previously.")

0 commit comments

Comments
 (0)