From 3e4d353d2c1db8d090fca8daf47ba29f7e928a82 Mon Sep 17 00:00:00 2001 From: Laurin Quast Date: Mon, 18 Feb 2019 06:59:48 -0800 Subject: [PATCH] feat(permissions-android): export Rationale type and add missing properties according to docs (#23510) Summary: I checked the documentation over at https://facebook.github.io/react-native/docs/permissionsandroid and the documented properties `buttonPositive`, `buttonNegative` and `buttonNeutral` are not available in the flow-type definitions. ___ Also the Rationale type is not exported which makes it hard to reuse it in a library or in your own application code. However I do not know if it is actually intended to import "internal" flow-types from `react-native` since I could not find any other type or interface being exported. So I am not 100% sure if I should have done this. [General] [Added] - Export Rationale flow-type and add missing properties `buttonPositive`, `buttonNegative` and `buttonNeutral` to the documentation. Pull Request resolved: https://github.com/facebook/react-native/pull/23510 Differential Revision: D14123848 Pulled By: cpojer fbshipit-source-id: 4040590932db645da6422d680246fed1d46dbe79 --- Libraries/PermissionsAndroid/PermissionsAndroid.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Libraries/PermissionsAndroid/PermissionsAndroid.js b/Libraries/PermissionsAndroid/PermissionsAndroid.js index 5974b294acd..853fb854817 100644 --- a/Libraries/PermissionsAndroid/PermissionsAndroid.js +++ b/Libraries/PermissionsAndroid/PermissionsAndroid.js @@ -12,9 +12,12 @@ const NativeModules = require('NativeModules'); -type Rationale = { +export type Rationale = { title: string, message: string, + buttonPositive?: string, + buttonNegative?: string, + buttonNeutral?: string, }; type PermissionStatus = 'granted' | 'denied' | 'never_ask_again';