Using typescript and composition api approach... The useToast function is not usable because the declaration file is missing (I think).
Adding the import statement as explained in documentation raise following error:
"Could not find a declaration file for module 'primevue/useToast'..."
useToast not working with typescript
This is my first time writing in a forum, sorry if my explanation is not very clear.
I have the same problem (although I'm not using typescript). I'm trying to use the Composition API exactly how they show in the documentation (https://primefaces.org/primevue/showcase/#/toast) and I get this error:
I tried the Options API and it works using .
I have the same problem (although I'm not using typescript). I'm trying to use the Composition API exactly how they show in the documentation (https://primefaces.org/primevue/showcase/#/toast) and I get this error:
Code: Select all
This dependency was not found: * primevue/useToast in ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./src/views/Upload.vue?vue&type=script&lang=js
Code: Select all
this.$toast.add({...})
-
- Posts: 5281
- Joined: 29 Jun 2013, 12:38
Hi,
Thanks a lot for the report! We'll check and get back to you.
Best Regards,
Thanks a lot for the report! We'll check and get back to you.
- No problem, you can be comfortable in this forumThis is my first time writing in a forum, sorry if my explanation is not very clear.
Best Regards,
Github Profile: https://github.com/mertsincan
-
- Information
-
Who is online
Users browsing this forum: No registered users and 9 guests