From 8e79b769ed0c202de874fcb734cf16d0876bcb95 Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Fri, 13 Oct 2023 12:48:26 -0700 Subject: [PATCH] refactor: fix vue typing Signed-off-by: Varun Patil --- src/components/Timeline.vue | 6 +++--- src/shims.d.ts | 6 +----- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/components/Timeline.vue b/src/components/Timeline.vue index e5a096b9..e54f60f2 100644 --- a/src/components/Timeline.vue +++ b/src/components/Timeline.vue @@ -305,11 +305,11 @@ export default defineComponent({ }, selectionManager() { - return this.$refs.selectionManager; + return this.$refs.selectionManager as InstanceType; }, scrollerManager() { - return this.$refs.scrollerManager; + return this.$refs.scrollerManager as InstanceType; }, /** Create new state */ @@ -452,7 +452,7 @@ export default defineComponent({ * the pixel position of the recycler has changed. */ scrollPositionChange(event?: Event) { - this.scrollerManager().recyclerScrolled(event); + this.scrollerManager().recyclerScrolled(event ?? null); }, /** Trigger when recycler view changes (for callback) */ diff --git a/src/shims.d.ts b/src/shims.d.ts index 1f3f468e..5ee58842 100644 --- a/src/shims.d.ts +++ b/src/shims.d.ts @@ -3,11 +3,7 @@ declare module '*.svg' { export default content; } -declare module '*.vue' { - import type { defineComponent } from 'vue'; - const Component: ReturnType; - export default Component; -} +declare module '*.vue'; // External components cannot be imported with .vue extension declare module '@nextcloud/vue/dist/Components/*' {