SweetAlertOptions.progressSteps inconsistent type definition
See original GitHub issueThe type definition of the progressSteps
field inside of the SweetAlertOptions
class specifies an array of SweetAlertOptions
, however the example shows it being used as an array of strings.
The setProgressSteps
method also takes an array of strings, therefore I think the progressSteps
field inside of the SweetAlertOptions
class should be updated to expect an array of strings.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:7 (7 by maintainers)
Top Results From Across the Web
facing some issue to set type on sweetalert2 - Stack Overflow
Argument of type '{ animation: boolean; title: string; }' is not assignable to parameter of type 'SweetAlertOptions<any, any>'.
Read more >sweetalert2/sweetalert2.d.ts at main - GitHub
Normalizes the arguments you can give to Swal.fire() in an object of type SweetAlertOptions. *. * Example: * ```. * Swal.argsToParams(['title', 'text']) ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks a lot @michaelbull for reporting and fixing this! 🍻
If I pass the array of
SweetAlertOptions
to theprogressSteps
field when callingswal.setDefaults
(example below), then this happens (note the step numbers are replaced with[object Object]
).