From fb43aab117698eb8a8bbb07339bdc8892ec69e53 Mon Sep 17 00:00:00 2001 From: Evan You Date: Thu, 2 Sep 2021 14:18:52 -0400 Subject: [PATCH] chore: remove wrongly placed type casts --- packages/sfc-playground/src/output/srcdoc.html | 6 +++--- scripts/release.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/sfc-playground/src/output/srcdoc.html b/packages/sfc-playground/src/output/srcdoc.html index d42b506e..91dd9e1a 100644 --- a/packages/sfc-playground/src/output/srcdoc.html +++ b/packages/sfc-playground/src/output/srcdoc.html @@ -61,7 +61,7 @@ } window.__next__ = undefined send_ok() - } catch (e: any) { + } catch (e) { send_error(e.message, e.stack); } } @@ -109,7 +109,7 @@ } try { parent.postMessage({ action: 'error', value: error }, '*'); - } catch (e: any) { + } catch (e) { parent.postMessage({ action: 'error', value: msg }, '*'); } } @@ -121,7 +121,7 @@ } try { parent.postMessage({ action: 'unhandledrejection', value: event.reason }, '*'); - } catch (e: any) { + } catch (e) { parent.postMessage({ action: 'unhandledrejection', value: event.reason.message }, '*'); } }); diff --git a/scripts/release.js b/scripts/release.js index 7f3ea402..482367a0 100644 --- a/scripts/release.js +++ b/scripts/release.js @@ -220,7 +220,7 @@ async function publishPackage(pkgName, version, runIfNotDry) { } ) console.log(chalk.green(`Successfully published ${pkgName}@${version}`)) - } catch (e: any) { + } catch (e) { if (e.stderr.match(/previously published/)) { console.log(chalk.red(`Skipping already published: ${pkgName}`)) } else {