diff --git a/toastr/toastr-tests.ts b/toastr/toastr-tests.ts index a49b8684c..9a5ae6a19 100644 --- a/toastr/toastr-tests.ts +++ b/toastr/toastr-tests.ts @@ -47,7 +47,8 @@ function test_fromdemo() { toastr.options = { debug: $('#debugInfo').prop('checked'), tapToDismiss: $('#tapToDismiss').prop('checked'), - positionClass: $('#positionGroup input:radio:checked').val() || 'toast-top-right' + positionClass: $('#positionGroup input:radio:checked').val() || 'toast-top-right', + preventDuplicates: true } if ($fadeIn.val().length) { toastr.options.showDuration = +$fadeIn.val() diff --git a/toastr/toastr.d.ts b/toastr/toastr.d.ts index 0af198944..8745a6157 100644 --- a/toastr/toastr.d.ts +++ b/toastr/toastr.d.ts @@ -114,6 +114,11 @@ interface ToastrOptions { **/ newestOnTop?: boolean; + /** + * Rather than having identical toasts stack, set the preventDuplicates property to true. Duplicates are matched to the previous toast based on their message content. + */ + preventDuplicates?: boolean; + /** * Function to execute on toast click */