I am trying to use sweet alert in my angular project.
That's how I use sweet alert:
import swal from 'sweetalert';
swal({
title: "Problem",
text: "Try again later!",
icon: "error"
})
I get the following error:
ERROR in node_modules/sweetalert/typings/sweetalert.d.ts(4,9): error TS2403: Subsequent variable declarations must have the same type. Variable 'swal' must be of type 'typeof import("C:/Users/user/Desktop/University/Thesis/workspace/web/myProject/project/node_modules/sweetalert/typings/sweetalert")', but here has type 'SweetAlert'.
Anyone can help me with that?