refac: APICall에 타입 지정

- 비 undefined 타입에서 ?타입 호출 제거
- API 소속 type들을 defs/API/ 로 이동
- 모든 SammoAPI, SammoRootAPI 지정
This commit is contained in:
2022-04-03 18:16:53 +09:00
parent b029c8b3ce
commit 315dcf80c9
17 changed files with 176 additions and 115 deletions
+2 -1
View File
@@ -129,7 +129,8 @@
</template>
<script setup lang="ts">
import type { BettingDetailResponse, BettingInfo, ToastType } from "@/defs";
import type { ToastType } from "@/defs";
import type { BettingDetailResponse, BettingInfo } from "@/defs/API/Betting";
import { SammoAPI } from "@/SammoAPI";
import { joinYearMonth } from "@/util/joinYearMonth";
import { parseYearMonth } from "@/util/parseYearMonth";
+3 -2
View File
@@ -267,7 +267,7 @@ import VueTypes from "vue-types";
import DragSelect from "@/components/DragSelect.vue";
import { isString, range, trim } from "lodash";
import { SammoAPI } from "@/SammoAPI";
import type { ChiefResponse, CommandItem, ReserveCommandResponse, TurnObj } from "@/defs";
import type { CommandItem, TurnObj } from "@/defs";
import { QueryActionHelper } from "@/util/QueryActionHelper";
import type { Args } from "@/processing/args";
import type { StoredActionsHelper } from "@/util/StoredActionsHelper";
@@ -275,6 +275,7 @@ import { getNpcColor } from "@/common_legacy";
import { BButton, BDropdownItem, BDropdownText, BButtonGroup, BDropdownDivider, BDropdown } from "bootstrap-vue-3";
import CommandSelectForm from "@/components/CommandSelectForm.vue";
import SimpleClock from "@/components/SimpleClock.vue";
import type { ChiefResponse } from "@/defs/API/NationCommand";
type TurnObjWithTime = TurnObj & {
time: string;
@@ -539,7 +540,7 @@ async function reserveCommand() {
}
try {
const result = await SammoAPI.NationCommand.ReserveCommand<ReserveCommandResponse>({
const result = await SammoAPI.NationCommand.ReserveCommand({
turnList: reqTurnList,
action: commandName,
});