[react-native] Add AccessibilityAction name definition (#38703)

This commit is contained in:
Be
2019-10-04 04:10:43 -07:00
committed by Eloy Durán
parent 32b6d5ef2a
commit 01913b6072

View File

@@ -24,6 +24,7 @@
// Theo Henry de Villeneuve <https://github.com/theohdv>
// Eli White <https://github.com/TheSavior>
// Romain Faust <https://github.com/romain-faust>
// Be Birchall <https://github.com/bebebebebe>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
@@ -2009,10 +2010,39 @@ export interface AccessibilityProps extends AccessibilityPropsAndroid, Accessibi
}
export type AccessibilityActionInfo = Readonly<{
name: string;
name: AccessibilityActionName;
label?: string;
}>;
export type AccessibilityActionName =
/**
* Generated when a screen reader user double taps the component.
*/
| 'activate'
/**
* Gererated when a screen reader user increments an adjustable component.
*/
| 'increment'
/**
* Gererated when a screen reader user decrements an adjustable component.
*/
| 'decrement'
/**
* Generated when a TalkBack user places accessibility focus on the component and double taps and holds one finger on the screen.
* @platform android
*/
| 'longpress'
/**
* Generated when a VoiceOver user places focus on or inside the component and double taps with two fingers.
* @platform ios
* */
| 'magicTap'
/**
* Generated when a VoiceOver user places focus on or inside the component and performs a two finger scrub gesture (left, right, left).
* @platform ios
* */
| 'escape';
export type AccessibilityActionEvent = NativeSyntheticEvent<
Readonly<{
actionName: string;