mirror of
https://github.com/github/codeql-action.git
synced 2026-10-30 17:39:50 +00:00
Fix compile errors introduced by typescript 4.4.2
4.4.2 introduces a breaking change that the variable in a catch clause is now `unknown` type. So, we need to cast the `e`, `err`, or `error` variables to type `Error`.
This commit is contained in:
@@ -335,7 +335,7 @@ test("convert to semver", (t) => {
|
||||
);
|
||||
t.deepEqual(parsedVersion, expectedVersion);
|
||||
} catch (e) {
|
||||
t.fail(e.message);
|
||||
t.fail(e instanceof Error ? e.message : String(e));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user