t4t5 / sweetalert

A beautiful replacement for JavaScript's "alert"
https://sweetalert.js.org
MIT License
22.4k stars 2.84k forks source link

Error in Angular 10 #951

Open pauloscatena opened 3 years ago

pauloscatena commented 3 years ago

https://github.com/t4t5/sweetalert/blob/82c8869761c138f1fba7771a818e40f1aab35be6/src/sweetalert.d.ts#L9

Hi guys! This line causes a compilation error in Angular 10: Subsequent variable declarations must have the same type. Variable 'swal' must be of type 'typeof import("/myproject/node_modules/sweetalert/typings/sweetalert")', but here has type 'SweetAlert'.

I fixed here by commenting it.

Please, if you have a different solution, can you show an example?

Captura de tela de 2020-12-01 18-51-25