chore: update to latest TypeScript (#32596)

This commit is contained in:
Milan Burda 2022-01-31 12:37:40 +01:00 committed by GitHub
parent 32ae67c873
commit db9ab80694
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 15 additions and 69 deletions

View file

@ -92,7 +92,7 @@ function loadApplicationPackage (packagePath: string) {
try {
packageJson = require(packageJsonPath);
} catch (e) {
showErrorMessage(`Unable to parse ${packageJsonPath}\n\n${e.message}`);
showErrorMessage(`Unable to parse ${packageJsonPath}\n\n${(e as Error).message}`);
return;
}
@ -111,7 +111,7 @@ function loadApplicationPackage (packagePath: string) {
const filePath = Module._resolveFilename(packagePath, module, true);
app.setAppPath(appPath || path.dirname(filePath));
} catch (e) {
showErrorMessage(`Unable to find Electron app at ${packagePath}\n\n${e.message}`);
showErrorMessage(`Unable to find Electron app at ${packagePath}\n\n${(e as Error).message}`);
return;
}
@ -119,7 +119,7 @@ function loadApplicationPackage (packagePath: string) {
Module._load(packagePath, module, true);
} catch (e) {
console.error('App threw an error during load');
console.error(e.stack || e);
console.error((e as Error).stack || e);
throw e;
}
}