forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vex-js.d.ts
45 lines (37 loc) · 1.08 KB
/
vex-js.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
// Type definitions for Vex v2.3.2
// Project: https://github.com/HubSpot/vex
// Definitions by: Greg Cohan <https://github.com/gdcohan>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
///<reference path="../jquery/jquery.d.ts" />
declare namespace vex {
interface ICSSAttributes {
[property: string]: string | number;
}
interface IVexOptions {
afterClose?: (() => void);
afterOpen?: ((vexContent: JQuery) => void);
content?: string;
showCloseButton?: boolean;
escapeButtonCloses?: boolean;
overlayClosesOnClick?: boolean;
appendLocation?: HTMLElement | JQuery | string;
className?: string;
css?: ICSSAttributes;
overlayClassName?: string;
overlayCSS?: ICSSAttributes;
contentClassName?: string;
contentCSS?: ICSSAttributes;
closeClassName?: string;
closeCSS?: ICSSAttributes;
}
interface Vex {
open(options: IVexOptions): JQuery;
close(id?: number): boolean;
closeAll(): boolean;
closeByID(id: number): boolean;
}
}
declare module "vex" {
export = vex;
}
declare var vex: vex.Vex;