forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fastclick.d.ts
44 lines (38 loc) · 1.31 KB
/
fastclick.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
// Type definitions for FastClick v1.0.3
// Project: https://github.com/ftlabs/fastclick
// Definitions by: Shinnosuke Watanabe <https://github.com/shinnn>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
interface FastClickObject {
lastTouchIdentifier: number;
layer: Element;
tapDelay: number;
targetElement: any;
touchBoundary: number;
touchStartX: number;
touchStartY: number;
trackingClick: boolean;
trackingClickStart: number;
destroy(): void;
determineEventType(targetElement: any): string;
findControl(labelElement: any /* EventTarget | HTMLLabelElement */): any;
focus(targetElement: any /* EventTarget | Element */): void;
getTargetElementFromEventTarget(eventTarget: EventTarget): any;
needsClick(target: any /* EventTarget | Element */): boolean;
needsFocus(target: any /* EventTarget | Element */): boolean;
}
interface FastClickOptions {
touchBoundary?: number;
tapDelay?: number;
}
interface FastClickStatic {
new(layer: any, options?: FastClickOptions): FastClickObject;
attach(layer: any, options?: FastClickOptions): FastClickObject;
}
declare module "fastclick" {
function fastclick(layer: any, options?: FastClickOptions): FastClickObject;
module fastclick {
var FastClick: FastClickStatic;
}
export = fastclick;
}
declare var FastClick: FastClickStatic;