chore: remove wrongly placed type casts

This commit is contained in:
Evan You 2021-09-02 14:18:52 -04:00
parent bacb2012ac
commit fb43aab117
2 changed files with 4 additions and 4 deletions

View File

@ -61,7 +61,7 @@
} }
window.__next__ = undefined window.__next__ = undefined
send_ok() send_ok()
} catch (e: any) { } catch (e) {
send_error(e.message, e.stack); send_error(e.message, e.stack);
} }
} }
@ -109,7 +109,7 @@
} }
try { try {
parent.postMessage({ action: 'error', value: error }, '*'); parent.postMessage({ action: 'error', value: error }, '*');
} catch (e: any) { } catch (e) {
parent.postMessage({ action: 'error', value: msg }, '*'); parent.postMessage({ action: 'error', value: msg }, '*');
} }
} }
@ -121,7 +121,7 @@
} }
try { try {
parent.postMessage({ action: 'unhandledrejection', value: event.reason }, '*'); parent.postMessage({ action: 'unhandledrejection', value: event.reason }, '*');
} catch (e: any) { } catch (e) {
parent.postMessage({ action: 'unhandledrejection', value: event.reason.message }, '*'); parent.postMessage({ action: 'unhandledrejection', value: event.reason.message }, '*');
} }
}); });

View File

@ -220,7 +220,7 @@ async function publishPackage(pkgName, version, runIfNotDry) {
} }
) )
console.log(chalk.green(`Successfully published ${pkgName}@${version}`)) console.log(chalk.green(`Successfully published ${pkgName}@${version}`))
} catch (e: any) { } catch (e) {
if (e.stderr.match(/previously published/)) { if (e.stderr.match(/previously published/)) {
console.log(chalk.red(`Skipping already published: ${pkgName}`)) console.log(chalk.red(`Skipping already published: ${pkgName}`))
} else { } else {