forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtoastr-1.2.d.ts
47 lines (42 loc) · 1.16 KB
/
toastr-1.2.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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;