mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-03 11:41:44 +00:00
react-tap-event-plugin: include shouldRejectClick option. (#9444)
This commit is contained in:
committed by
Masahiro Wakame
parent
31c3c5db10
commit
d9b6b8e455
@@ -1,5 +1,18 @@
|
||||
/// <reference path="react-tap-event-plugin.d.ts"/>
|
||||
|
||||
import * as injectTapEventPlugin from 'react-tap-event-plugin';
|
||||
import * as injectTapEventPluginAll from 'react-tap-event-plugin';
|
||||
|
||||
injectTapEventPlugin();
|
||||
// since the export is a function, this is the only actual correct way:
|
||||
import injectTapEventPluginRequire = require("react-tap-event-plugin");
|
||||
|
||||
injectTapEventPluginAll();
|
||||
|
||||
injectTapEventPluginAll({
|
||||
shouldRejectClick: function (lastTouchEventTimestamp, clickEventTimestamp) {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
injectTapEventPluginRequire();
|
||||
|
||||
injectTapEventPluginRequire({});
|
||||
|
||||
+7
-2
@@ -4,6 +4,11 @@
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare module 'react-tap-event-plugin'{
|
||||
var exports:()=>any;
|
||||
export = exports;
|
||||
interface StrategyOverrides {
|
||||
shouldRejectClick?: (lastTouchEventTimestamp: Date, clickEventTimestamp: Date) => boolean;
|
||||
}
|
||||
|
||||
var injectTapEventPlugin: (strategyOverrides?: StrategyOverrides) => void;
|
||||
|
||||
export = injectTapEventPlugin;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user