refactor: fix vue typing

Signed-off-by: Varun Patil <radialapps@gmail.com>
pull/877/head
Varun Patil 2023-10-13 12:48:26 -07:00
parent 044d94f3b9
commit 8e79b769ed
2 changed files with 4 additions and 8 deletions

View File

@ -305,11 +305,11 @@ export default defineComponent({
}, },
selectionManager() { selectionManager() {
return <any>this.$refs.selectionManager; return this.$refs.selectionManager as InstanceType<typeof SelectionManager>;
}, },
scrollerManager() { scrollerManager() {
return <any>this.$refs.scrollerManager; return this.$refs.scrollerManager as InstanceType<typeof ScrollerManager>;
}, },
/** Create new state */ /** Create new state */
@ -452,7 +452,7 @@ export default defineComponent({
* the pixel position of the recycler has changed. * the pixel position of the recycler has changed.
*/ */
scrollPositionChange(event?: Event) { scrollPositionChange(event?: Event) {
this.scrollerManager().recyclerScrolled(event); this.scrollerManager().recyclerScrolled(event ?? null);
}, },
/** Trigger when recycler view changes (for callback) */ /** Trigger when recycler view changes (for callback) */

6
src/shims.d.ts vendored
View File

@ -3,11 +3,7 @@ declare module '*.svg' {
export default content; export default content;
} }
declare module '*.vue' { declare module '*.vue';
import type { defineComponent } from 'vue';
const Component: ReturnType<typeof defineComponent>;
export default Component;
}
// External components cannot be imported with .vue extension // External components cannot be imported with .vue extension
declare module '@nextcloud/vue/dist/Components/*' { declare module '@nextcloud/vue/dist/Components/*' {