Skip to content

Commit f91681a

Browse files
Fix flow checks
1 parent a35be0c commit f91681a

File tree

6 files changed

+12
-8
lines changed

6 files changed

+12
-8
lines changed

packages/react-native/Libraries/Alert/Alert.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ class Alert {
276276
static promptMacOS(
277277
title: ?string,
278278
message?: ?string,
279-
callbackOrButtons?: ?((text: string) => void) | Buttons,
279+
callbackOrButtons?: ?((text: string) => void) | AlertButtons,
280280
type?: ?AlertType = 'plain-text',
281281
defaultInputs?: DefaultInputsArray,
282282
modal?: ?boolean,

packages/react-native/Libraries/Components/TextInput/TextInput.flow.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,15 +98,15 @@ export type TextInputEditingEvent =
9898
NativeSyntheticEvent<TextInputEndEditingEventData>;
9999

100100
// [macOS macOS-only
101-
export type SettingChangeEvent = SyntheticEvent<
101+
export type SettingChangeEvent = NativeSyntheticEvent<
102102
$ReadOnly<{|
103103
autoCorrectEnabled: boolean,
104104
spellCheckEnabled: boolean,
105105
grammarCheckEnabled: boolean,
106106
|}>,
107107
>;
108108

109-
export type PasteEvent = SyntheticEvent<
109+
export type PasteEvent = NativeSyntheticEvent<
110110
$ReadOnly<{|
111111
dataTransfer: {|
112112
files: $ReadOnlyArray<{|

packages/react-native/Libraries/Components/TextInput/TextInput.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,15 +133,15 @@ export type TextInputEditingEvent =
133133
NativeSyntheticEvent<TextInputEndEditingEventData>;
134134

135135
// [macOS macOS-only
136-
export type SettingChangeEvent = SyntheticEvent<
136+
export type SettingChangeEvent = NativeSyntheticEvent<
137137
$ReadOnly<{|
138138
autoCorrectEnabled: boolean,
139139
spellCheckEnabled: boolean,
140140
grammarCheckEnabled: boolean,
141141
|}>,
142142
>;
143143

144-
export type PasteEvent = SyntheticEvent<
144+
export type PasteEvent = NativeSyntheticEvent<
145145
$ReadOnly<{|
146146
dataTransfer: {|
147147
files: $ReadOnlyArray<{|
@@ -943,7 +943,7 @@ export type TextInputProps = $ReadOnly<{
943943
/**
944944
* Callback that is called when the text input is focused.
945945
*/
946-
onFocus?: ?(e: TextInputFocusEvent) => void, // [macOS]
946+
onFocus?: ?(e: TextInputFocusEvent) => void, // [macOS]
947947

948948
/**
949949
* Callback that is called when a key is pressed.

packages/react-native/Libraries/Types/CoreEventTypes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ export type NativeScrollPoint = $ReadOnly<{
284284
}>;
285285

286286
// [macOS
287-
export type KeyEvent = SyntheticEvent<
287+
export type KeyEvent = NativeSyntheticEvent<
288288
$ReadOnly<{|
289289
// Modifier keys
290290
capsLockKey: boolean,

packages/react-native/index.js.flow

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@ export {default as Vibration} from './Libraries/Vibration/Vibration';
104104

105105
export {default as DeviceEventEmitter} from './Libraries/EventEmitter/RCTDeviceEventEmitter';
106106
export {DynamicColorIOS} from './Libraries/StyleSheet/PlatformColorValueTypesIOS';
107+
export {
108+
ColorWithSystemEffectMacOS,
109+
DynamicColorMacOS,
110+
} from './Libraries/StyleSheet/PlatformColorValueTypesMacOS'; // [macOS]
107111
export {default as NativeAppEventEmitter} from './Libraries/EventEmitter/RCTNativeAppEventEmitter';
108112
export {default as NativeModules} from './Libraries/BatchedBridge/NativeModules';
109113
export {default as Platform} from './Libraries/Utilities/Platform';

packages/virtualized-lists/Lists/VirtualizedList.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1494,7 +1494,7 @@ class VirtualizedList extends StateSafePureComponent<
14941494
_selectRowAtIndex = (rowIndex: number) => {
14951495
const prevIndex = this.state.selectedRowIndex;
14961496
const newIndex = rowIndex;
1497-
this.setState({selectedRowIndex: newIndex});
1497+
this.setState<'selectedRowIndex'>({selectedRowIndex: newIndex});
14981498

14991499
this.ensureItemAtIndexIsVisible(newIndex);
15001500
if (prevIndex !== newIndex) {

0 commit comments

Comments
 (0)