Update for toastr 1.0.3

This commit is contained in:
Boris Yankov
2012-11-08 09:59:43 +02:00
parent 320fd6b0a2
commit ff458d14ee
2 changed files with 28 additions and 10 deletions
+16 -7
View File
@@ -3,7 +3,8 @@
// Definitions by: Boris Yankov <https://github.com/borisyankov/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
interface ToastOptions {
interface ToastrOptions {
tapToDismiss?: bool;
toastClass?: string;
containerId?: string;
@@ -22,16 +23,24 @@ interface ToastOptions {
timeOut?: number;
titleClass?: string;
messageClass?: string;
onclick?: () => void;
}
interface ToastrDisplayMethod {
(message: string): void;
(message: string, title: string): void;
(message: string, title: string, overrides: ToastrOptions): void;
}
interface Toastr {
options: ToastOptions;
options: ToastrOptions;
clear(): void;
info(message: string, title?: string): void;
warning(message: string, title?: string): void;
success(message: string, title?: string): void;
error(message: string, title?: string): void;
info: ToastrDisplayMethod;
warning: ToastrDisplayMethod;
success: ToastrDisplayMethod;
error: ToastrDisplayMethod;
}
declare var toastr: Toastr;
declare var toastr: Toastr;