refac: SammoAPI에 타입 지정

This commit is contained in:
2022-04-03 02:17:14 +09:00
parent 45a8a9d581
commit d7552d1c43
10 changed files with 82 additions and 70 deletions
+2 -10
View File
@@ -206,6 +206,7 @@ import TopBackBar from "@/components/TopBackBar.vue";
import _ from "lodash";
import NumberInputWithInfo from "@/components/NumberInputWithInfo.vue";
import { SammoAPI } from "./SammoAPI";
import type { inheritBuffType } from "./defs/API/InheritAction";
type InheritanceType =
| "previous"
@@ -292,15 +293,6 @@ const inheritanceViewText: Record<InheritanceViewType, { title: string; info: st
},
};
type inheritBuffType =
| "warAvoidRatio"
| "warCriticalRatio"
| "warMagicTrialProb"
| "domesticSuccessProb"
| "domesticFailProb"
| "warAvoidRatioOppose"
| "warCriticalRatioOppose"
| "warMagicTrialProbOppose";
declare const currentInheritBuff: {
[v in inheritBuffType]: number | undefined;
@@ -481,7 +473,7 @@ export default defineComponent({
}
try {
await SammoAPI.InheritAction[type]({});
await SammoAPI.InheritAction[type]();
} catch (e) {
console.error(e);
alert(`실패했습니다: ${e}`);