I'm working on Angular 6 Project, using vscode IDE.
"dependencies": {
"sweetalert2": "^7.20.9"
}
I have run npm i sweetalert2 and import swal from 'sweetalert2'; in my code.
When I tried to use swal.mixin({ .. }), I'm getting the mixin error:
Property 'mixin' does not exist on type 'typeof swal'
Do I missed out anything?
No, the definition file does not contain this method yet.
It has to be updated, I'll try to have a look soon, but for the moment you can do this:
// @todo swal.mixin() is not in SweetAlert's .d.ts for now (see sweetalert2/sweetalert2/issues/1110)
(swal as any).mixin({ .. });
The "moment" is quite long ...
It might be quite simple work isn't it?
@darron1217 we are opened for your contributions :)
Most helpful comment
No, the definition file does not contain this method yet.
It has to be updated, I'll try to have a look soon, but for the moment you can do this: