perf(cli): defer command-specific modules until dispatch
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import type { UninstallResult } from "./Uninstall.js";
|
||||
|
||||
/** Whether any requested REA-owned uninstall action failed. */
|
||||
export const isUninstallFailure = (result: UninstallResult): boolean => {
|
||||
const status = result.status;
|
||||
switch (status) {
|
||||
case "complete":
|
||||
return false;
|
||||
case "failed":
|
||||
return true;
|
||||
default: {
|
||||
const exhaustive: never = status;
|
||||
throw new TypeError(
|
||||
`Unhandled uninstall result status: ${String(exhaustive)}`,
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user