Hi, my sweet alert modal is not showing and I'm getting this error on the console:
ERROR TypeError: sweetalert_1.default is not a function

I'm using Angular v5 and SweetAlert 2.1.0.
I'm importing it with the following code:
import swal from 'sweetalert';
And I'm trying to show a simple alert with the following code:
swal("Hello world!");
Any tips?
I found the error:
I was importing it like the above code, as the documentation says but I had to import it with the following code:
import * as sweetalert from 'sweetalert';
sweetalert("Hello world!");
I couldnt user "swal" alias for some reason. Typings I guess. This way works fine.

no me sirve
bueno sirve pero me da ese error
Same error. Nothing changes, even with @rafamds approach. His approach gives:
Cannot invoke an expression whose type lacks a call signature. Type 'typeof "/home/khophi/Developments/Angular/PackageToMe/node_modules/sweetalert/typings/sweetalert"' has no compatible call signatures
@seanmavley take a look at #799, this might be a duplicate of that issue.
@lionralfs thanks for pointing out. I was just about to reference that issue in this thread. The #799 solution you presented is working fine here too.
Thanks.
Most helpful comment
I found the error:
I was importing it like the above code, as the documentation says but I had to import it with the following code:
I couldnt user "swal" alias for some reason. Typings I guess. This way works fine.