forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tether.d.ts
50 lines (41 loc) · 1.26 KB
/
tether.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
// Type definitions for Tether v0.6
// Project: http://github.hubspot.com/tether/
// Definitions by: Adi Dahiya <https://github.com/adidahiya>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module tether {
interface TetherStatic {
new(options: ITetherOptions): Tether;
}
interface ITetherOptions {
attachment?: string;
classes?: {[className: string]: boolean};
classPrefix?: string;
constraints?: ITetherConstraint[];
element?: HTMLElement | string | any /* JQuery */;
enabled?: boolean;
offset?: string;
optimizations?: any;
target?: HTMLElement | string | any /* JQuery */;
targetAttachment?: string;
targetOffset?: string;
targetModifier?: string;
}
interface ITetherConstraint {
attachment?: string;
outOfBoundsClass?: string;
pin?: boolean | string[];
pinnedClass?: string;
to?: string | HTMLElement | number[];
}
interface Tether {
setOptions(options: ITetherOptions): void;
disable(): void;
enable(): void;
destroy(): void;
position(): void;
}
}
declare module "tether" {
export = tether;
}
declare var Tether: tether.TetherStatic;