ankurk91/vue-toast-notification

Typescript [vue-3] - Type ToastPluginApi has no call signatures

dolbex opened this issue · 10 comments

I'm submitting a ... (check one with "x")

[x ] Bug report => search github for a similar issue or PR before submitting
[ ] Feature request
[ ] Other, please describe

Tell about your platform

  • Vue.js version : 3.2.33
  • Browser name and version : Chrome 101
  • This package version : 3.0.2

Current behavior
We are getting an odd error with typescript enabled

This expression is not callable.
  Type 'ToastPluginApi' has no call signatures.ts(2349)

Screen Shot 2022-05-20 at 10 23 07 AM

Expected behavior
Um... not that? ¯_(ツ)_/¯

I am not a TS expert, need help from community

lol, neither am I sir. Certainly appreciate anyone's guidance on this one.

Thank you for reporting @dolbex. Can you show how you imported useToast and ToastPluginAPI?

I have released a new version with a fix.
Please update the package to 3.0.3 and let me know if it is fixed.

@ankurk91 While that fixes one thing it causes another issue.

@Macavity
Please explain the issue :)

Creating a PR right now ;-)

@Macavity
Version 3.0.4 has been released .

Thanks for the PR :)

Thanks so much for working on this so quickly! Much appreciated!