-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathindex.d.ts
64 lines (52 loc) · 1.52 KB
/
index.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
declare module "@ppzp/noty";
declare module "@ppzp/noty/noty.js";
declare module '@ppzp/noty/animation/index.js';
declare module '@ppzp/noty/content/index.js';
declare var noty: notyJs.noty;
declare function Noty(options: notyJs.notyOptions): notyJs.noty;
declare namespace notyJs {
interface notyOptions {
rootClass?: string;
customPosition?: boolean;
mount?: HTMLElement;
Content?: Content;
Animation?: Animation;
duration?: number;
}
interface createContentHTMLElement {
(text: string, options?: ContentOptions): HTMLElement;
}
interface ContentOptions {
duration?: number;
onClose?: () => void;
closeBtn?: boolean;
}
interface Content {
[method: string]: createContentHTMLElement;
}
interface createCCZAnimationOptions {
duration?: number;
}
interface createCCZAnimation {
(options?: createCCZAnimationOptions): Animation;
}
interface Animation {
show: (content: Content, container?: HTMLElement) => void;
close: (content: Content, container?: HTMLElement) => void;
}
interface notyContent {
root: HTMLElement;
content: HTMLElement;
duration: number;
onClose: () => void;
close: () => void;
closed: () => boolean;
timeoutID: number;
}
interface notyFunction {
(text: string, options?: ContentOptions): notyContent;
}
interface noty {
[method: string]: notyFunction;
}
}