Skip to content
This repository was archived by the owner on Nov 5, 2023. It is now read-only.
This repository was archived by the owner on Nov 5, 2023. It is now read-only.

[BUG] Argument of type 'Ref<HTMLElement | SVGElement | VueInstance | undefined>' is not assignable to parameter of type 'MaybeElementRef'. #164

@mesqueeb

Description

@mesqueeb

Recently I'm getting issues like these again in my typescript based project

image

I do have skipLibCheck: true in tsconfig, so not sure what's causing it though : S

ERROR in ../../node_modules/vue-virtual-scroll-grid/src/Grid.vue:97:37
TS2345: Argument of type 'Ref<HTMLElement | SVGElement | VueInstance | undefined>' is not assignable to parameter of type 'MaybeElementRef'.
  Property '[RefSymbol]' is missing in type 'Ref<HTMLElement | SVGElement | VueInstance | undefined>' but required in type 'Ref<HTMLElement | SVGElement | VueInstance | null | undefined>'.
     95 |       pageSize$: fromProp(props, "pageSize"),
     96 |       // a stream of item size measurements when it is changed
  >  97 |       itemRect$: fromResizeObserver(probeRef, "contentRect"),
        |                                     ^^^^^^^^
     98 |       // a stream of root elements when it is resized
     99 |       rootResize$: fromResizeObserver(rootRef, "target"),
    100 |       // a stream of root elements when scrolling

ERROR in ../../node_modules/vue-virtual-scroll-grid/src/Grid.vue:99:39
TS2345: Argument of type 'Ref<HTMLElement | SVGElement | VueInstance | undefined>' is not assignable to parameter of type 'MaybeElementRef'.
     97 |       itemRect$: fromResizeObserver(probeRef, "contentRect"),
     98 |       // a stream of root elements when it is resized
  >  99 |       rootResize$: fromResizeObserver(rootRef, "target"),
        |                                       ^^^^^^^
    100 |       // a stream of root elements when scrolling
    101 |       scroll$: fromWindowScroll(rootRef),
    102 |       scrollTo$: fromProp(props, "scrollTo"),

ERROR in ../../node_modules/vue-virtual-scroll-grid/src/Grid.vue:101:33
TS2345: Argument of type 'Ref<HTMLElement | SVGElement | VueInstance | undefined>' is not assignable to parameter of type 'MaybeElementRef'.
     99 |       rootResize$: fromResizeObserver(rootRef, "target"),
    100 |       // a stream of root elements when scrolling
  > 101 |       scroll$: fromWindowScroll(rootRef),
        |                                 ^^^^^^^
    102 |       scrollTo$: fromProp(props, "scrollTo"),
    103 |     });
    104 |

image

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingreleased

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions