mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
Updated intro.js definition to reflect v2.0
(1) Updates for v2.0, primarily hint-related items (2) Updates for the IntroJs Factory interface / constructor
This commit is contained in:
parent
163a427719
commit
b5376ef459
17
intro.js/intro.js.d.ts
vendored
17
intro.js/intro.js.d.ts
vendored
@ -1,4 +1,4 @@
|
||||
// Type definitions for intro.js 1.1.1
|
||||
// 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/borisyankov/DefinitelyTyped
|
||||
@ -29,12 +29,15 @@ declare module IntroJs {
|
||||
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;
|
||||
@ -48,12 +51,20 @@ declare module IntroJs {
|
||||
onexit(callback: Function): IntroJs;
|
||||
onbeforechange(callback: (element: HTMLElement) => any): IntroJs;
|
||||
onafterchange(callback: (element: HTMLElement) => any): IntroJs;
|
||||
onchange(callback: Function): 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 {
|
||||
(element?: string): IntroJs;
|
||||
(): IntroJs;
|
||||
(element: HTMLElement): IntroJs;
|
||||
(querySelector: string): IntroJs;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user