mirror of
https://github.com/facebook/react.git
synced 2026-02-26 07:55:55 +00:00
40 lines
978 B
JavaScript
40 lines
978 B
JavaScript
/**
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @flow
|
|
*/
|
|
|
|
export type RNTopLevelEventType =
|
|
| 'topMouseDown'
|
|
| 'topMouseMove'
|
|
| 'topMouseUp'
|
|
| 'topScroll'
|
|
| 'topSelectionChange'
|
|
| 'topTouchCancel'
|
|
| 'topTouchEnd'
|
|
| 'topTouchMove'
|
|
| 'topTouchStart';
|
|
|
|
export opaque type DOMTopLevelEventType = string;
|
|
|
|
// Do not uses the below two methods directly!
|
|
// Instead use constants exported from DOMTopLevelEventTypes in ReactDOM.
|
|
// (It is the only module that is allowed to access these methods.)
|
|
|
|
export function unsafeCastStringToDOMTopLevelType(
|
|
topLevelType: string,
|
|
): DOMTopLevelEventType {
|
|
return topLevelType;
|
|
}
|
|
|
|
export function unsafeCastDOMTopLevelTypeToString(
|
|
topLevelType: DOMTopLevelEventType,
|
|
): string {
|
|
return topLevelType;
|
|
}
|
|
|
|
export type TopLevelType = DOMTopLevelEventType | RNTopLevelEventType;
|