UNPKG

1.21 kBTypeScriptView Raw
1interface FastClickObject {
2 lastTouchIdentifier: number;
3 layer: Element;
4 tapDelay: number;
5 targetElement: any;
6 touchBoundary: number;
7 touchStartX: number;
8 touchStartY: number;
9 trackingClick: boolean;
10 trackingClickStart: number;
11 destroy(): void;
12 determineEventType(targetElement: any): string;
13 findControl(labelElement: any /* EventTarget | HTMLLabelElement */): any;
14 focus(targetElement: any /* EventTarget | Element */): void;
15 getTargetElementFromEventTarget(eventTarget: EventTarget): any;
16 needsClick(target: any /* EventTarget | Element */): boolean;
17 needsFocus(target: any /* EventTarget | Element */): boolean;
18}
19
20interface FastClickOptions {
21 touchBoundary?: number | undefined;
22 tapDelay?: number | undefined;
23}
24
25interface FastClickStatic {
26 new(layer: any, options?: FastClickOptions): FastClickObject;
27 attach(layer: any, options?: FastClickOptions): FastClickObject;
28}
29
30declare module "fastclick" {
31 function fastclick(layer: any, options?: FastClickOptions): FastClickObject;
32 namespace fastclick {
33 var FastClick: FastClickStatic;
34 }
35
36 export = fastclick;
37}
38
39declare var FastClick: FastClickStatic;