From 1712f10e8ab6f85b0e79200d4b971ffcafc7f2dd Mon Sep 17 00:00:00 2001 From: Greg Price Date: Wed, 10 Oct 2018 22:57:30 -0700 Subject: [PATCH 1/7] style: Use RN upstream's narrower version of an over-broad style type. It's less over-broad than ours in one very nice way: for every legitimate style prop, it specifies the right type for its values (right down to the allowed set of values for things like `flexDirection`), and will cause the type-checker to complain on an ill-typed value. --- src/types.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/types.js b/src/types.js index ebf6ed3437d..dabbf13e367 100644 --- a/src/types.js +++ b/src/types.js @@ -3,6 +3,7 @@ import type { Node } from 'react'; import type { Dispatch as ReduxDispatch } from 'redux'; import type { IntlShape } from 'react-intl'; import type { InputSelector } from 'reselect'; +import type { DangerouslyImpreciseStyleProp } from 'react-native/Libraries/StyleSheet/StyleSheet'; import type { Auth, @@ -30,7 +31,11 @@ export type ThunkDispatch = ((Dispatch, GetState) => T) => T; export type Dispatch = ReduxDispatch<*> & ThunkDispatch<*>; -export type Style = boolean | number | Array