Merge pull request #12756 from ryanpineo/toastr-remove

add toastr.remove type def
This commit is contained in:
Nathan Shively-Sanders
2016-11-23 12:39:09 -08:00
committed by GitHub
2 changed files with 11 additions and 4 deletions
+2 -1
View File
@@ -8,6 +8,7 @@ function test_basic() {
t.push(toastr.error('I do not think that word means what you think it means.', 'Inconceivable!'));
toastr.clear(t[0]); // clear 1
toastr.clear(); // clear all
toastr.remove();
var msg = 'Do you think Rodents of Unusual Size really exist?';
var title = 'Fireswamp Legends';
@@ -82,4 +83,4 @@ function test_fromdemo() {
$('#cleartoasts').click(function () {
toastr.clear();
});
}
}
+9 -3
View File
@@ -174,19 +174,25 @@ interface Toastr {
(): void;
/**
* Clear specific toast
*
*
* @param toast Toast to clear
*/
(toast: JQuery): void;
/**
* Clear specific toast
*
*
* @param toast Toast to clear
* @param clearOptions force clearing a toast, ignoring focus
*/
(toast: JQuery, clearOptions: { force: boolean }): void;
};
/**
* Removes all toasts (without animation)
*/
remove: {
(): void;
};
/**
* Create an error toast
*/
error: ToastrDisplayMethod;
@@ -207,7 +213,7 @@ interface Toastr {
*/
warning: ToastrDisplayMethod;
/**
* Get toastr version
* Get toastr version
*/
version: string;
}