forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap-notify.d.ts
62 lines (56 loc) · 1.47 KB
/
bootstrap-notify.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
// Type definitions for bootstrap-notify v3.1.3
// Project: http://bootstrap-notify.remabledesigns.com/
// Definitions by: Blake Niemyjski <https://github.com/niemyjski/>, Robert McIntosh <https://github.com/mouse0270>, Robert Voica <https://github.com/robert-voica>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery.d.ts" />
/* tslint:disable: interface-name no-any */
interface JQueryStatic {
/* tslint:enable: interface-name */
notify(message: string): NotifyReturn;
notify(opts: NotifyOptions, settings?: NotifySettings): NotifyReturn;
notifyDefaults(settings: NotifySettings): void;
notifyClose(): void;
notifyClose(command: string): void;
}
interface NotifyOptions {
message: string;
title?: string;
icon?: string;
url?: string;
target?: string;
}
interface NotifySettings {
element?: string;
position?: string;
type?: string;
allow_dismiss?: boolean;
allow_duplicates?: boolean;
newest_on_top?: boolean;
showProgressbar?: boolean;
placement?: {
from?: string;
align?: string;
};
offset?: number;
spacing?: number;
z_index?: number;
delay?: number;
timer?: number;
url_target?: string;
mouse_over?: string;
animate?: {
enter?: string;
exit?: string;
};
onShow?: () => void;
onShown?: () => void;
onClose?: () => void;
onClosed?: () => void;
icon_type?: string;
template?: string;
}
interface NotifyReturn {
$ele: JQueryStatic;
close: () => void;
update: (command: string, update: any) => void;
}