add toastr.remove type def

This commit is contained in:
Ryan Pineo
2016-11-17 12:57:21 -05:00
parent 68cabf45e1
commit ffbdae8cae
2 changed files with 11 additions and 4 deletions

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();
});
}
}

12
toastr/toastr.d.ts vendored
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;
}