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:
parent
5b28adb7ed
commit
40568daca8
83 changed files with 601 additions and 576 deletions
4
lib/config-utils.js
generated
4
lib/config-utils.js
generated
|
|
@ -351,7 +351,7 @@ async function getLanguagesInRepo(repository, apiDetails, logger) {
|
|||
// into an array gives us an array of languages ordered by popularity
|
||||
const languages = new Set();
|
||||
for (const lang of Object.keys(response.data)) {
|
||||
const parsedLang = languages_1.parseLanguage(lang);
|
||||
const parsedLang = (0, languages_1.parseLanguage)(lang);
|
||||
if (parsedLang !== undefined) {
|
||||
languages.add(parsedLang);
|
||||
}
|
||||
|
|
@ -391,7 +391,7 @@ async function getLanguages(codeQL, languagesInput, repository, apiDetails, logg
|
|||
const parsedLanguages = [];
|
||||
const unknownLanguages = [];
|
||||
for (const language of languages) {
|
||||
const parsedLanguage = languages_1.parseLanguage(language);
|
||||
const parsedLanguage = (0, languages_1.parseLanguage)(language);
|
||||
if (parsedLanguage === undefined) {
|
||||
unknownLanguages.push(language);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue