question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Property 'fire' does not exist on type 'typeof swal & ReactSweetAlert'.

See original GitHub issue

Following 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:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
zenflowcommented, Jun 18, 2018

There are two options for a workaround until this is fixed:

  1. Don’t use MySwal.fire(...args). Instead use new MySwal(...args). These are equivalent.
  2. If you are doing nothing with the return value, the 1st workaround would cause a “no-new” lint error, so use (MySwal as any).fire(...args). I suggest also leaving a comment referring to this issue.
0reactions
limontecommented, Mar 23, 2019

🎉 This issue has been resolved in version 1.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found