2016-09-08 03:40:45 +08:00
|
|
|
/**
|
2018-09-08 06:11:23 +08:00
|
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
2016-09-08 03:40:45 +08:00
|
|
|
*
|
2017-09-25 04:48:13 +08:00
|
|
|
* This source code is licensed under the MIT license found in the
|
|
|
|
|
* LICENSE file in the root directory of this source tree.
|
2016-09-08 03:40:45 +08:00
|
|
|
*
|
|
|
|
|
* @flow
|
|
|
|
|
*/
|
|
|
|
|
|
2017-10-25 07:55:00 +08:00
|
|
|
import type {Fiber} from 'react-reconciler/src/ReactFiber';
|
2016-09-08 03:40:45 +08:00
|
|
|
import type {
|
|
|
|
|
DispatchConfig,
|
|
|
|
|
ReactSyntheticEvent,
|
2017-10-25 07:55:00 +08:00
|
|
|
} from './ReactSyntheticEventType';
|
2018-05-15 22:03:07 +08:00
|
|
|
import type {TopLevelType} from './TopLevelEventTypes';
|
2016-09-08 03:40:45 +08:00
|
|
|
|
2016-09-11 07:44:08 +08:00
|
|
|
export type EventTypes = {[key: string]: DispatchConfig};
|
2016-09-08 03:40:45 +08:00
|
|
|
|
2018-09-18 01:43:16 +08:00
|
|
|
export type AnyNativeEvent = Event | KeyboardEvent | MouseEvent | Touch;
|
2016-09-08 03:40:45 +08:00
|
|
|
|
|
|
|
|
export type PluginName = string;
|
|
|
|
|
|
|
|
|
|
export type PluginModule<NativeEvent> = {
|
|
|
|
|
eventTypes: EventTypes,
|
|
|
|
|
extractEvents: (
|
2018-05-15 17:38:50 +08:00
|
|
|
topLevelType: TopLevelType,
|
2018-06-30 03:51:48 +08:00
|
|
|
targetInst: null | Fiber,
|
2016-09-08 03:40:45 +08:00
|
|
|
nativeTarget: NativeEvent,
|
|
|
|
|
nativeEventTarget: EventTarget,
|
2017-11-15 09:48:40 +08:00
|
|
|
) => ?ReactSyntheticEvent,
|
2016-09-08 03:40:45 +08:00
|
|
|
tapMoveThreshold?: number,
|
|
|
|
|
};
|