updated for v1.2

This commit is contained in:
John Papa
2012-12-24 12:19:11 -05:00
parent 1f337f8742
commit c1171b9da8
+47
View File
@@ -0,0 +1,47 @@
/// <reference path="jquery.d.ts" />
// Type definitions for Toastr 1.0
// Project: https://github.com/CodeSeven/toastr
// Definitions by: Boris Yankov <https://github.com/borisyankov/>
// 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 {
clear(): void;
clear(toast: JQuery): void;
error: ToastrDisplayMethod;
info: ToastrDisplayMethod;
options: ToastrOptions;
success: ToastrDisplayMethod;
warning: ToastrDisplayMethod;
version: string;
}
declare var toastr: Toastr;