forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jquery.noty.d.ts
82 lines (70 loc) · 1.96 KB
/
jquery.noty.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
// Type definitions for jQuery.noty v2.0
// Project: http://needim.github.io/noty/
// Definitions by: Aaron King <https://github.com/kingdango/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
// Project by: Nedim Carter <http://needim.github.io>
/// <reference path='../jquery/jquery.d.ts'/>
interface NotyOptions {
layout?: string;
theme?: string;
type?: string;
/** Text to show. Can be html or string. */
text?: string;
/** If you want to use queue feature set this true. */
dismissQueue?: boolean;
/** The note`s optional template like '<div class="noty_message"><span class="noty_text"></span><div class="noty_close"></div></div>' */
template?: string;
animation?: NotyAnimationOptions;
/** Delay for closing event. Set false for sticky notifications */
timeout?: any;
/** Adds notification to the beginning of queue when set to true */
force?: boolean;
modal?: boolean;
/** You can set max visible notification for dismissQueue true option */
maxVisible?: number;
/** To close all notifications before show */
killer?: boolean;
closeWith?: any[];
callback?: NotyCallbackOptions;
/** An array of buttons or false to hide them */
buttons?: any;
}
interface NotyAnimationOptions {
open?: any;
close?: any;
easing?: string;
speed?: number;
}
interface NotyCallbackOptions {
onShow?: Function;
afterShow?: Function;
onClose?: Function;
afterClose?: Function;
}
interface NotyStatic {
(notyOptions: NotyOptions);
defaults: NotyOptions;
get(id: any);
close(id: any);
clearQueue();
closeAll();
setText(id: any, text: string);
setType(id: any, type: string);
}
interface Noty {
(notyOptions: NotyOptions);
show();
close();
setText(text: string);
setType(type: string);
setTimeout(timeout: number);
closed: boolean;
shown: boolean;
}
interface JQueryStatic {
noty: NotyStatic;
}
interface JQuery {
noty: Noty;
}
declare var noty: Noty;