Cannot use namespace 'OverlayPanel' as a type

UI Components for Vue
Post Reply
tarkhil
Posts: 17
Joined: 17 Dec 2020, 21:05

12 May 2021, 12:52

I'm trying to use an OverlayPanel via $refs, using TypeScript for my project

Code: Select all

(this.$refs.sortp as OverlayPanel).toggle(event)
fails with

Code: Select all

Cannot use namespace 'OverlayPanel' as a type
.

Again and again I feel TypeScript is a funny way to write your code three times and finally cast to any, but I have to use it right now. What should I do to cast vue ref to OverlayPanel type?

Post Reply

Return to “PrimeVue”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 14 guests