fix over 30 ts errors

This commit is contained in:
2023-03-25 00:36:42 +01:00
parent 28295e69d5
commit b89d041064
6 changed files with 22 additions and 9 deletions
+2 -2
View File
@@ -14,7 +14,7 @@
</span>
<span
title="Dismiss"
:class="{disabled: Object.keys(adventurers).length <= 0}"
:class="{disabled: Object.keys(this.adventurers).length <= 0}"
@click="dismissAdventurer()"
>
@@ -64,7 +64,7 @@ export default defineComponent({
adventurers: {
type: Object as PropType<{ [key: string]: Adventurer }>,
default() {
return {};
return {} as { [key: string]: Adventurer };
},
},
lastRecruitTime: {
+2 -1
View File
@@ -24,7 +24,7 @@
<script lang="ts">
import {defineComponent} from "vue";
import type {PropType} from "vue";
import type {Guild} from "@/classes/Guild";
import {Guild} from "@/classes/Guild";
import {version} from "../../package.json"
@@ -38,6 +38,7 @@ export default defineComponent({
props: {
guild: {
type: Object as PropType<Guild>,
default: () => new Guild(1, 0) as Guild,
},
}
});
+6 -6
View File
@@ -112,7 +112,7 @@ import {defineComponent, type PropType} from "vue";
import AdventurerComponent from "@/components/AdventurerMiniComponent.vue";
import type {Adventurer} from "@/classes/Adventurer";
import type {Quest} from "@/classes/Quest";
import type {Guild} from "@/classes/Guild";
import {Guild} from "@/classes/Guild";
import QuestMissive from "@/components/QuestMissive.vue";
export default defineComponent({
@@ -121,17 +121,20 @@ export default defineComponent({
props: {
guild: {
type: Object as PropType<Guild>,
default() {
return new Guild(1, 0);
},
},
adventurers: {
type: Object as PropType<{ [key: string]: Adventurer }>,
default() {
return {};
return {} as { [key: string]: Adventurer };
},
},
quests: {
type: Object as PropType<{ [key: string]: Quest }>,
default() {
return {};
return {} as { [key: string]: Quest };
},
},
lastRecruitTime: {
@@ -141,9 +144,6 @@ export default defineComponent({
}
},
},
data() {
return {};
},
emits: [ 'finalizeQuest', 'wipeSave', 'recruitActionTaken'],
})
</script>