mirror of
https://github.com/morluto/rea
synced 2026-10-26 22:28:27 -04:00
19 lines
497 B
TypeScript
19 lines
497 B
TypeScript
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)}`,
|
|
);
|
|
}
|
|
}
|
|
};
|