From 2e449f2b787d9e3065d9c1244cba659dc8923536 Mon Sep 17 00:00:00 2001 From: jakub791 Date: Thu, 4 May 2023 19:40:03 +0200 Subject: [PATCH] fix new TS errors --- src/components/Context.vue | 6 +++--- src/components/Options.vue | 32 ++++++++++++++++++++++------ src/features/action.tsx | 2 +- src/features/particles/Particles.vue | 3 ++- src/game/requirements.tsx | 2 +- src/lib/pixi.ts | 7 ------ src/util/vue.tsx | 4 +++- tests/utils.ts | 2 +- 8 files changed, 36 insertions(+), 22 deletions(-) delete mode 100644 src/lib/pixi.ts diff --git a/src/components/Context.vue b/src/components/Context.vue index 33cbf2b..9fd0f0b 100644 --- a/src/components/Context.vue +++ b/src/components/Context.vue @@ -11,7 +11,7 @@ import { BoundsInjectionKey } from "game/layers"; import type { FeatureNode } from "game/layers"; -import { nextTick, onMounted, provide, ref } from "vue"; +import { Ref, nextTick, onMounted, provide, ref } from "vue"; import { globalBus } from "game/events"; const emit = defineEmits<{ @@ -21,7 +21,7 @@ const emit = defineEmits<{ const nodes = ref>({}); const resizeObserver = new ResizeObserver(updateBounds); -const resizeListener = ref(null); +const resizeListener = ref(null) as Ref; onMounted(() => { // ResizeListener exists because ResizeObserver's don't work when told to observe an SVG element const resListener = resizeListener.value; @@ -30,7 +30,7 @@ onMounted(() => { } }); let isDirty = true; -let boundingRect = ref(resizeListener.value?.getBoundingClientRect()); +const boundingRect = ref(resizeListener.value?.getBoundingClientRect()); function updateBounds() { if (isDirty) { isDirty = false; diff --git a/src/components/Options.vue b/src/components/Options.vue index 93b57fa..a1b30a9 100644 --- a/src/components/Options.vue +++ b/src/components/Options.vue @@ -4,8 +4,15 @@

Settings

- - + +
@@ -15,7 +22,9 @@ - Manually save + Manually save