forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
intro.js.d.ts
74 lines (63 loc) · 2.18 KB
/
intro.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
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
// Type definitions for intro.js 2.0
// Project: https://github.com/usablica/intro.js
// Definitions by: Maxime Fabre <https://github.com/anahkiasen/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare namespace IntroJs {
interface Step {
intro: string;
element?: string|HTMLElement|Element;
position?: string;
}
interface Options {
nextLabel?: string;
prevLabel?: string;
skipLabel?: string;
doneLabel?: string;
tooltipPosition?: string;
tooltipClass?: string;
highlightClass?: string;
exitOnEsc?: boolean;
exitOnOverlayClick?: boolean;
showStepNumbers?: boolean;
keyboardNavigation?: boolean;
showButtons?: boolean;
showBullets?: boolean;
showProgress?: boolean;
scrollToElement?: boolean;
overlayOpacity?: number;
positionPrecedence?: string[];
disableInteraction?: boolean;
hintPosition?: string;
hintButtonLabel?: string;
steps?: Step[];
}
interface IntroJs {
start(): IntroJs;
exit(): IntroJs;
clone(): IntroJs;
goToStep(step: number): IntroJs;
nextStep(): IntroJs;
previousStep(): IntroJs;
refresh(): IntroJs;
setOption(option: string, value: string|number|boolean): IntroJs;
setOptions(options: Options): IntroJs;
onexit(callback: Function): IntroJs;
onbeforechange(callback: (element: HTMLElement) => any): IntroJs;
onafterchange(callback: (element: HTMLElement) => any): IntroJs;
onchange(callback: (element: HTMLElement) => any): IntroJs;
oncomplete(callback: Function): IntroJs;
addHints(): IntroJs;
onhintsadded(callback: Function): IntroJs;
onhintclick(callback: (hintElement: HTMLElement, item: Step, stepId: number) => any): IntroJs;
onhintclose(callback: (stepId: number) => any): IntroJs;
}
interface Factory {
(): IntroJs;
(element: HTMLElement): IntroJs;
(querySelector: string): IntroJs;
}
}
declare var introJs: IntroJs.Factory;
declare module 'intro.js' {
export = IntroJs;
}