forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
contextjs.d.ts
33 lines (29 loc) · 952 Bytes
/
contextjs.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
// Type definitions for contextjs 2.1.1
// Project: https://github.com/jakiestfu/Context.js
// Definitions by: Kern Handa <https://github.com/kernhanda>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module "contextjs" {
interface MenuObject {
action?: (e: Event) => void;
divider?: boolean;
header?: string;
href?: string;
subMenu?: MenuObject[];
target?: string;
text?: string;
}
interface InitSettings {
above?: string | boolean;
compress?: boolean;
fadeSpeed?: number;
filter?: (e: Element) => void;
preventDoubleContext?: boolean;
}
module context {
function init(settings?: InitSettings): void;
function destroy(selector: any): void;
function attach(selector: any, menuObjects: MenuObject[]): void;
function settings(settings: InitSettings): void;
}
export = context;
}