Open SamanthaAdrichem opened 5 years ago
I'm not really sure if this is an issue with SweetAlert's typings or if it's due to a regression in TypeScript. It seems like people are having the same problem in other libraries too: https://github.com/Microsoft/TypeScript/issues/28762 (downgrading TypeScript to 3.1.6
seems to make the problem go away)
If anyone knows how to solve this, feel free to send a PR!
For me downgrading to typescript 3.1.6 did not work though. I got the same error. Will try again.
Do you know what causes it? Then I could try and fix it and make a PR.
edit, nvm, the downgrade to 3.1.6 failed big time..
Based on what I've found, I still think it's a regression in TypeScript's library. I believe it was fixed with this pull request, so either downgrading or using their nightly build might solve the problem.
Let me know how it goes!
When i try to import it in combination with Angular (7) and typescrip i get the following error:
if i use
import swal from 'sweetalert';
swal is undefined. if i use any of the following i get the error as mentioned aboveimport * as swal from sweetalert
import swal = require('sweetalert')
Using the other sweetalert2 library does work, but I prefer to stay at this one. Tried it with the latest typescript 3.2.2 but also with specifically 3.1.6 as suggested
Any suggestions?