MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / runAction

Function runAction

packages/client/src/app/AppShell.tsx:2010–2027  ·  view source on GitHub ↗
(
    action: () => Promise<unknown>,
    refreshAfter = true,
  )

Source from the content-addressed store, hash-verified

2008 };
2009
2010 async function runAction(
2011 action: () => Promise<unknown>,
2012 refreshAfter = true,
2013 ): Promise<boolean> {
2014 setLocalError("");
2015 try {
2016 await action();
2017 if (refreshAfter) {
2018 await refresh();
2019 }
2020 return true;
2021 } catch (actionError) {
2022 setLocalError(
2023 actionError instanceof Error ? actionError.message : "Request failed.",
2024 );
2025 return false;
2026 }
2027 }
2028
2029 function toggleSoftwareKeyboard() {
2030 if (!selectedSimulator) {

Callers 2

promptForURLFunction · 0.85
promptForBundleIDFunction · 0.85

Calls 1

refreshFunction · 0.50

Tested by

no test coverage detected