forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
reveal.d.ts
81 lines (70 loc) · 1.97 KB
/
reveal.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
75
76
77
78
79
80
81
// Type definitions for Reveal 1.3.0
// Project: https://github.com/hakimel/reveal.js/
// Definitions by: grapswiz <https://github.com/grapswiz/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare var Reveal:RevealStatic;
interface RevealStatic {
initialize:(config:RevealOptions)=>void;
configure:(diff:RevealOptions)=>void;
// Navigation
slide(h:number, v:number, f?:number, o?:number):void;
left():void;
right():void;
up():void;
down():void;
prev():void;
next():void;
prevFragment():boolean;
nextFragment():boolean;
toggleOverview(override?:boolean):void;
// Retrieves the previous and current slide elements
getPreviousSlide():Element;
getCurrentSlide():Element;
getIndices(slide?:Element):{h:number; v:number;};
// States
addEventListener(type:string, listener:Function, useCapture?:boolean):void;
removeEventListener(type:string, listener:Function, useCapture?:boolean):void;
// undocumented method
layout():void;
togglePause():void;
isOverview():boolean;
isPaused():boolean;
addEventListeners():void;
removeEventListeners():void;
getSlide(x:number, y?:number):Element;
getScale():number;
getConfig():RevealOptions;
getQueryHash():any;
isFirstSlide():boolean;
isLastSlide():boolean;
}
interface RevealOptions {
// Configuration
controls?:boolean;
progress?:boolean;
history?:boolean;
keyboard?:boolean;
overview?:boolean;
center?:boolean;
touch?:boolean; // undocumented.
loop?:boolean;
rtl?:boolean;
autoSlide?:number;
mouseWheel?:boolean;
rollingLinks?:boolean;
theme?:string;
transition?:string;
// Presentation Size
width?:number;
height?:number;
margin?:number;
minScale?:number;
maxScale?:number;
// Dependencies
dependencies?:RevealDependency[];
}
interface RevealDependency {
src:string;
condition:()=>boolean;
async?:boolean;
}