Property 'fire' does not exist on type 'typeof swal & ReactSweetAlert'.
See original GitHub issueFollowing the sample exactly as it exists in the ReadMe, I get the following error saying 'fire' does not exist on type 'typeof swal & ReactSweetAlert'.
and taking a look at sweetalert2.d.ts
, ‘fire’ indeed does not exist.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:5 (5 by maintainers)
Top Results From Across the Web
facing some issue to set type on sweetalert2 - Stack Overflow
The animation parameter has been removed, use showClass and hideClass instead: Swal.fire({ icon: 'success', title: 'I am not animated', ...
Read more >https://unpkg.com/sweetalert2@7.33.1/sweetalert2.d.ts
SweetAlertOptions): typeof swal; /** * Determines if a modal is shown. * Be aware that the library returns a trueish or falsy value,...
Read more >Guides - SweetAlert
And with a third argument, you can add an icon to your alert! There are 4 predefined ones: "warning" , "error" , "success"...
Read more >sweetalert2 - npm
A beautiful, responsive, customizable, accessible (WAI-ARIA) replacement for JavaScript's popup boxes. Zero dependencies.
Read more >angular property does not exist on type - Code Grepper
angular property does not exist on type. Add Answer | View In TPC Matrix. Technical Problem Cluster First Answered On June 23, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
There are two options for a workaround until this is fixed:
MySwal.fire(...args)
. Instead usenew MySwal(...args)
. These are equivalent.(MySwal as any).fire(...args)
. I suggest also leaving a comment referring to this issue.🎉 This issue has been resolved in version 1.1.0 🎉
The release is available on:
Your semantic-release bot 📦🚀