diff --git a/toastr/toastr-1.0.d.ts b/toastr/toastr-1.0.d.ts
deleted file mode 100644
index e4c842ec96..0000000000
--- a/toastr/toastr-1.0.d.ts
+++ /dev/null
@@ -1,48 +0,0 @@
-// Type definitions for Toastr 1.0
-// Project: https://github.com/CodeSeven/toastr
-// Definitions by: Boris Yankov
-// Definitions: https://github.com/borisyankov/DefinitelyTyped
-
-
-///
-
-interface ToastrOptions {
- tapToDismiss?: bool;
- toastClass?: string;
- containerId?: string;
- debug?: bool;
- fadeIn?: number;
- fadeOut?: number;
- extendedTimeOut?: number;
- iconClasses?: {
- error: string;
- info: string;
- success: string;
- warning: string;
- };
- iconClass?: string;
- positionClass?: string;
- timeOut?: number;
- titleClass?: string;
- messageClass?: string;
-
- onclick?: () => void;
-}
-
-interface ToastrDisplayMethod {
- (message: string): JQuery;
- (message: string, title: string): JQuery;
- (message: string, title: string, overrides: ToastrOptions): JQuery;
-}
-
-interface Toastr {
- options: ToastrOptions;
-
- clear(): void;
- info: ToastrDisplayMethod;
- warning: ToastrDisplayMethod;
- success: ToastrDisplayMethod;
- error: ToastrDisplayMethod;
-}
-
-declare var toastr: Toastr;
diff --git a/toastr/toastr-tests.ts b/toastr/toastr-tests.ts
index 7e7e8352b7..cc99b28ce8 100644
--- a/toastr/toastr-tests.ts
+++ b/toastr/toastr-tests.ts
@@ -1,17 +1,18 @@
-///
+///
function test_basic() {
- toastr.info('Are you the 6 fingered man?');
- toastr.warning('My name is Inigo Montoya. You Killed my father, prepare to die!');
- toastr.success('Have fun storming the castle!', 'Miracle Max Says');
- toastr.error('I do not think that word means what you tink it means.', 'Inconceivable!');
- toastr.clear();
+ var t = [];
+ t.push(toastr.info('Are you the 6 fingered man?'));
+ t.push(toastr.warning('My name is Inigo Montoya. You Killed my father, prepare to die!'));
+ t.push(toastr.success('Have fun storming the castle!', 'Miracle Max Says'));
+ 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
var msg = 'Do you think Rodents of Unusual Size really exist?';
var title = 'Fireswamp Legends';
var overrides = { timeOut: 250 };
toastr.warning(msg, title, overrides);
-
toastr.options.onclick = function () { }
}
@@ -55,6 +56,11 @@ function test_fromdemo() {
alert('Surprise! you clicked me. i was toast #' + toastIndex + '. You could perform an action here.')
})
}
-
- });
+ });
+ $('#clearlasttoast').click(function() {
+ toastr.clear($toastlast);
+ });
+ $('#cleartoasts').click(function () {
+ toastr.clear();
+ });
}
\ No newline at end of file