fix(types): satisfy strict tsc for production build (deploy unblock)
🔍 Lint / 🪄 Check lint (push) Has been cancelled
🔍 Lint / 🎨 Check format (push) Has been cancelled
🔍 Lint / 🔎 Typecheck (push) Has been cancelled
📊 Quality / 🔒 Security Audit (push) Has been cancelled
📊 Quality / 📋 Dependency Freshness (push) Has been cancelled
📊 Quality / 📦 Bundle Size (push) Has been cancelled
🔍 Lint / 🏗 Build (push) Has been cancelled

This commit is contained in:
Tom Boullay
2026-06-03 02:40:54 +02:00
parent e9808f8473
commit d8b916d31f
12 changed files with 56 additions and 51 deletions
+15 -2
View File
@@ -10,6 +10,7 @@ const REPAIR_MISSION_ID_VALUES: ReadonlySet<string> = new Set(
export const MISSION_STEPS = [
"locked",
"electricienne_history",
"approaching",
"arrived",
"npc-return",
@@ -30,12 +31,20 @@ const PYLON_ONLY_MISSION_STEPS = new Set<MissionStep>([
"npc-return",
"narrator-outro",
]);
const FARM_ONLY_MISSION_STEPS = new Set<MissionStep>(["electricienne_history"]);
export function getMissionStepsFor(
mission: RepairMissionId,
): readonly MissionStep[] {
if (mission === "pylon") return MISSION_STEPS;
return MISSION_STEPS.filter((step) => !PYLON_ONLY_MISSION_STEPS.has(step));
return MISSION_STEPS.filter((step) => {
if (mission !== "pylon" && PYLON_ONLY_MISSION_STEPS.has(step)) {
return false;
}
if (mission !== "farm" && FARM_ONLY_MISSION_STEPS.has(step)) {
return false;
}
return true;
});
}
export function isRepairMissionId(value: string): value is RepairMissionId {
@@ -53,6 +62,8 @@ export function getNextMissionStep(
switch (step) {
case "locked":
return mission === "pylon" ? "approaching" : "waiting";
case "electricienne_history":
return "done";
case "approaching":
return "arrived";
case "arrived":
@@ -85,6 +96,8 @@ export function getPreviousMissionStep(
switch (step) {
case "locked":
return "locked";
case "electricienne_history":
return "locked";
case "approaching":
return "locked";
case "arrived":