Skip to content

Commit 4f3c378

Browse files
committed
Some props fixes
1 parent 1b12e2c commit 4f3c378

File tree

8 files changed

+44
-42
lines changed

8 files changed

+44
-42
lines changed

Libraries/Animated/src/Animated.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @flow strict-local
7+
* @flow
88
* @format
99
*/
1010

@@ -13,23 +13,23 @@
1313
const AnimatedImplementation = require('AnimatedImplementation');
1414

1515
module.exports = {
16-
get FlatList() {
17-
return require('AnimatedFlatList');
16+
get FlatList() {
17+
return require('AnimatedFlatList');
1818
},
19-
get Image() {
20-
return require('AnimatedImage');
19+
get Image() {
20+
return require('AnimatedImage');
2121
},
22-
get ScrollView() {
23-
return require('AnimatedScrollView');
22+
get ScrollView() {
23+
return require('AnimatedScrollView');
2424
},
25-
get SectionList() {
26-
return require('AnimatedSectionList');
25+
get SectionList() {
26+
return require('AnimatedSectionList');
2727
},
28-
get Text() {
29-
return require('AnimatedText');
28+
get Text() {
29+
return require('AnimatedText');
3030
},
31-
get View() {
32-
return require('AnimatedView');
31+
get View() {
32+
return require('AnimatedView');
3333
},
34-
...AnimatedImplementation,
34+
...AnimatedImplementation,
3535
};

Libraries/Components/Button.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,30 +37,30 @@ type ButtonProps = $ReadOnly<{|
3737
/**
3838
* Color of the text (iOS), or background color of the button (Android)
3939
*/
40-
color ?: ? string,
40+
color?: ?string,
4141

4242
/**
4343
* TV preferred focus (see documentation for the View component).
4444
*/
45-
hasTVPreferredFocus ?: ? boolean,
45+
hasTVPreferredFocus?: ?boolean,
4646

4747
/**
4848
* Text to display for blindness accessibility features
4949
*/
50-
accessibilityLabel ?: ? string,
50+
accessibilityLabel?: ?string,
5151
/**
5252
* Hint text to display blindness accessibility features
5353
*/
54-
accessibilityHint: PropTypes.string, // TODO(OSS Candidate ISS#2710739)
54+
accessibilityHint? : ?string, // TODO(OSS Candidate ISS#2710739)
5555
/**
5656
* If true, disable all interactions for this component.
5757
*/
58-
disabled ?: ? boolean,
58+
disabled?: ?boolean,
5959

6060
/**
6161
* Used to locate this view in end-to-end tests.
6262
*/
63-
testID ?: ? string,
63+
testID?: ?string,
6464
|}>;
6565

6666
/**

Libraries/Components/Picker/PickerIOS.macos.js

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,29 +19,16 @@ var NativeMethodsMixin = require('NativeMethodsMixin');
1919
var React = require('React');
2020
const PropTypes = require('prop-types');
2121
var StyleSheet = require('StyleSheet');
22-
var StyleSheetPropType = require('StyleSheetPropType');
23-
var TextStylePropTypes = require('TextStylePropTypes');
2422
var View = require('View');
25-
const ViewPropTypes = require('ViewPropTypes');
2623
var processColor = require('processColor');
2724

2825
var createReactClass = require('create-react-class');
29-
var itemStylePropType = StyleSheetPropType(TextStylePropTypes);
3026
var requireNativeComponent = require('requireNativeComponent');
3127

3228
var PickerIOS = createReactClass({
3329
displayName: 'PickerIOS',
3430
mixins: [NativeMethodsMixin],
3531

36-
propTypes: {
37-
...ViewPropTypes,
38-
children: PropTypes.arrayOf(PropTypes.any),
39-
itemStyle: itemStylePropType,
40-
onChange: PropTypes.func,
41-
onValueChange: PropTypes.func,
42-
selectedValue: PropTypes.any, // string or integer basically
43-
},
44-
4532
getInitialState: function() {
4633
return this._stateFromProps(this.props);
4734
},

Libraries/Components/View/ViewPropTypes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,4 +573,4 @@ export type ViewProps = $ReadOnly<{|
573573
* Any additional platform-specific view prop types, or prop type overrides.
574574
*/
575575
...PlatformViewPropTypes,
576-
};
576+
|};

Libraries/Renderer/shims/ReactTypes.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ export type ReactNode =
1919

2020
export type ReactEmpty = null | void | boolean;
2121

22-
export type ReactEmpty = null | void | boolean;
23-
2422
export type ReactFragment = ReactEmpty | Iterable<React$Node>;
2523

2624
export type ReactNodeList = ReactEmpty | React$Node;

Libraries/react-native/react-native-implementation.macos.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ const ReactNative = {
348348

349349
// Prop Types
350350
get ColorPropType() {
351-
return require('ColorPropType');
351+
return require('DeprecatedColorPropType');
352352
},
353353
get EdgeInsetsPropType() {
354354
return require('EdgeInsetsPropType');

RNTester/js/AnimatedExampleMacOS.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ exports.examples = [
6363
}
6464
class FadeInExample extends React.Component<$FlowFixMeProps, any> {
6565
state: any;
66-
66+
/* $FlowFixMe(>=0.85.0 site=react_native_fb) This comment suppresses an
67+
* error found when Flow v0.85 was deployed. To see the error, delete
68+
* this comment and run Flow. */
6769
constructor(props) {
6870
super(props);
6971
this.state = {

RNTester/js/TextInputExample.macos.js

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,9 @@ class TextInputAccessoryViewExample extends React.Component<{}, *> {
125125
*/
126126

127127
class RewriteExample extends React.Component<$FlowFixMeProps, any> {
128+
/* $FlowFixMe(>=0.85.0 site=react_native_fb) This comment suppresses an
129+
* error found when Flow v0.85 was deployed. To see the error, delete
130+
* this comment and run Flow. */
128131
constructor(props) {
129132
super(props);
130133
this.state = {text: ''};
@@ -157,7 +160,10 @@ class RewriteExampleInvalidCharacters extends React.Component<
157160
$FlowFixMeProps,
158161
any,
159162
> {
160-
constructor(props) {
163+
/* $FlowFixMe(>=0.85.0 site=react_native_fb) This comment suppresses an
164+
* error found when Flow v0.85 was deployed. To see the error, delete
165+
* this comment and run Flow. */
166+
constructor(props) {
161167
super(props);
162168
this.state = {text: ''};
163169
}
@@ -178,7 +184,10 @@ class RewriteExampleInvalidCharacters extends React.Component<
178184
}
179185

180186
class RewriteExampleKana extends React.Component<$FlowFixMeProps, any> {
181-
constructor(props) {
187+
/* $FlowFixMe(>=0.85.0 site=react_native_fb) This comment suppresses an
188+
* error found when Flow v0.85 was deployed. To see the error, delete
189+
* this comment and run Flow. */
190+
constructor(props) {
182191
super(props);
183192
this.state = {text: ''};
184193
}
@@ -199,7 +208,10 @@ class RewriteExampleKana extends React.Component<$FlowFixMeProps, any> {
199208
}
200209

201210
class SecureEntryExample extends React.Component<$FlowFixMeProps, any> {
202-
constructor(props) {
211+
/* $FlowFixMe(>=0.85.0 site=react_native_fb) This comment suppresses an
212+
* error found when Flow v0.85 was deployed. To see the error, delete
213+
* this comment and run Flow. */
214+
constructor(props) {
203215
super(props);
204216
this.state = {text: ''};
205217
}
@@ -220,7 +232,10 @@ class SecureEntryExample extends React.Component<$FlowFixMeProps, any> {
220232
}
221233

222234
class TokenizedTextExample extends React.Component<$FlowFixMeProps, any> {
223-
constructor(props) {
235+
/* $FlowFixMe(>=0.85.0 site=react_native_fb) This comment suppresses an
236+
* error found when Flow v0.85 was deployed. To see the error, delete
237+
* this comment and run Flow. */
238+
constructor(props) {
224239
super(props);
225240
this.state = {text: 'Hello #World'};
226241
}

0 commit comments

Comments
 (0)