swal on confirm function typescript code example Example: sweet alert <script src="https://cdn.jsdelivr.net/npm/sweetalert2@9"></script>