mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-23 12:56:46 +08:00
add toastr.remove type def
This commit is contained in:
@@ -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
12
toastr/toastr.d.ts
vendored
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user