From 31e4220dde5dce6d282bb70eb786f03e70eba0b3 Mon Sep 17 00:00:00 2001 From: cailenmusselman Date: Tue, 13 Dec 2016 18:15:28 -0600 Subject: [PATCH] ModalProperties should be optional These properties should be optional. https://github.com/facebook/react-native/blob/master/Libraries/Modal/Modal.js#L113-L124 i.e. they are PropTypes.func / PropTypes.arrayOf not PropTypes.func.required / PropTypes.arrayOf().required --- react-native/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/react-native/index.d.ts b/react-native/index.d.ts index 195015b09e..a300a266ca 100644 --- a/react-native/index.d.ts +++ b/react-native/index.d.ts @@ -3772,13 +3772,13 @@ declare module "react" { * On iOS, the modal is still restricted by what's specified in your app's Info.plist's UISupportedInterfaceOrientations field. * @platform ios */ - supportedOrientations: ('portrait' | 'portrait-upside-down' | 'landscape' | 'landscape-left' | 'landscape-right')[] + supportedOrientations?: ('portrait' | 'portrait-upside-down' | 'landscape' | 'landscape-left' | 'landscape-right')[] /** * The `onOrientationChange` callback is called when the orientation changes while the modal is being displayed. * The orientation provided is only 'portrait' or 'landscape'. This callback is also called on initial render, regardless of the current orientation. * @platform ios */ - onOrientationChange: () => void, + onOrientationChange?: () => void } export interface ModalStatic extends React.ComponentClass {