diff --git a/packages/react-native/Libraries/Performance/QuickPerformanceLogger.js b/packages/react-native/Libraries/Performance/QuickPerformanceLogger.js index 4a0da73e478..57d43e470f8 100644 --- a/packages/react-native/Libraries/Performance/QuickPerformanceLogger.js +++ b/packages/react-native/Libraries/Performance/QuickPerformanceLogger.js @@ -16,7 +16,7 @@ const DUMMY_INSTANCE_KEY = 0; // Defines map of annotations // Use as following: // {string: {key1: value1, key2: value2}} -export type AnnotationsMap = $Shape<{ +export type AnnotationsMap = Partial<{ string: ?{[string]: string, ...}, int: ?{[string]: number, ...}, double: ?{[string]: number, ...}, diff --git a/packages/react-native/Libraries/StyleSheet/StyleSheetTypes.js b/packages/react-native/Libraries/StyleSheet/StyleSheetTypes.js index 405f9e10165..5bb8c8c71b8 100644 --- a/packages/react-native/Libraries/StyleSheet/StyleSheetTypes.js +++ b/packages/react-native/Libraries/StyleSheet/StyleSheetTypes.js @@ -892,20 +892,22 @@ type GenericStyleProp<+T> = | $ReadOnlyArray>; export type ____DangerouslyImpreciseStyleProp_Internal = GenericStyleProp< - $Shape<____DangerouslyImpreciseStyle_Internal>, + Partial<____DangerouslyImpreciseStyle_Internal>, >; export type ____ViewStyleProp_Internal = GenericStyleProp< - $ReadOnly<$Shape<____ViewStyle_Internal>>, + $ReadOnly>, >; export type ____TextStyleProp_Internal = GenericStyleProp< - $ReadOnly<$Shape<____TextStyle_Internal>>, + $ReadOnly>, >; export type ____ImageStyleProp_Internal = GenericStyleProp< - $ReadOnly<$Shape<____ImageStyle_Internal>>, + $ReadOnly>, >; export type ____Styles_Internal = { - +[key: string]: $Shape<____DangerouslyImpreciseStyle_Internal>, + // $FlowFixMe[incompatible-exact] + // $FlowFixMe[incompatible-type] + +[key: string]: Partial<____DangerouslyImpreciseStyle_Internal>, ... }; diff --git a/packages/react-native/flow-typed/npm/yargs_v17.x.x.js b/packages/react-native/flow-typed/npm/yargs_v17.x.x.js index 2750236797a..65f3d61507c 100644 --- a/packages/react-native/flow-typed/npm/yargs_v17.x.x.js +++ b/packages/react-native/flow-typed/npm/yargs_v17.x.x.js @@ -1,4 +1,3 @@ -// flow-typed signature: cab38813101e0a162deaae556391abc8 // flow-typed version: f7c859e705/yargs_v17.x.x/flow_>=v0.104.x declare module "yargs" { @@ -9,7 +8,7 @@ declare module "yargs" { ... }; - declare type Options = $Shape<{ + declare type Options = Partial<{ alias: string | Array, array: boolean, boolean: boolean, diff --git a/packages/rn-tester/js/examples/FlatList/BaseFlatListExample.js b/packages/rn-tester/js/examples/FlatList/BaseFlatListExample.js index 708f0d95989..d4bf8709b61 100644 --- a/packages/rn-tester/js/examples/FlatList/BaseFlatListExample.js +++ b/packages/rn-tester/js/examples/FlatList/BaseFlatListExample.js @@ -60,7 +60,7 @@ const Item = ({item, separators}: RenderItemProps) => { }; type Props = { - exampleProps: $Shape>, + exampleProps: Partial>, onTest?: ?() => void, testLabel?: ?string, testOutput?: ?string, @@ -93,11 +93,14 @@ const BaseFlatListExample = React.forwardRef( {props.children} item + index} style={styles.list} + // $FlowFixMe[incompatible-type-arg] renderItem={Item} /> diff --git a/packages/rn-tester/js/examples/SectionList/SectionListBaseExample.js b/packages/rn-tester/js/examples/SectionList/SectionListBaseExample.js index 2bf5c915f95..f1312dcbb59 100644 --- a/packages/rn-tester/js/examples/SectionList/SectionListBaseExample.js +++ b/packages/rn-tester/js/examples/SectionList/SectionListBaseExample.js @@ -66,7 +66,7 @@ const Item = ({item, section, separators}) => { }; type Props = { - exampleProps: $Shape>, + exampleProps: Partial>, onTest?: ?() => void, testLabel?: ?string, testOutput?: ?string, @@ -98,6 +98,7 @@ const SectionListBaseExample: React.AbstractComponent< ref={ref} testID="section_list" accessibilityRole="list" + // $FlowFixMe[incompatible-type] sections={DATA} keyExtractor={(item, index) => item + index} style={styles.list} diff --git a/packages/virtualized-lists/Lists/StateSafePureComponent.js b/packages/virtualized-lists/Lists/StateSafePureComponent.js index 909be315c7b..503f97eba05 100644 --- a/packages/virtualized-lists/Lists/StateSafePureComponent.js +++ b/packages/virtualized-lists/Lists/StateSafePureComponent.js @@ -32,7 +32,7 @@ export default class StateSafePureComponent< } setState( - partialState: ?($Shape | ((State, Props) => ?$Shape)), + partialState: ?(Partial | ((State, Props) => ?Partial)), callback?: () => mixed, ): void { if (typeof partialState === 'function') { diff --git a/packages/virtualized-lists/Lists/VirtualizedListCellRenderer.js b/packages/virtualized-lists/Lists/VirtualizedListCellRenderer.js index 91e1a62ad91..c4295c0ed93 100644 --- a/packages/virtualized-lists/Lists/VirtualizedListCellRenderer.js +++ b/packages/virtualized-lists/Lists/VirtualizedListCellRenderer.js @@ -36,7 +36,7 @@ export type Props = { onUnmount: (cellKey: string) => void, onUpdateSeparators: ( cellKeys: Array, - props: $Shape>, + props: Partial>, ) => void, prevCellKey: ?string, renderItem?: ?RenderItemType, diff --git a/packages/virtualized-lists/Lists/VirtualizedSectionList.js b/packages/virtualized-lists/Lists/VirtualizedSectionList.js index 61519bca4dc..d217bcde8c5 100644 --- a/packages/virtualized-lists/Lists/VirtualizedSectionList.js +++ b/packages/virtualized-lists/Lists/VirtualizedSectionList.js @@ -561,7 +561,7 @@ function ItemWithSeparator(props: ItemWithSeparatorProps): React.Node { }, updateProps: ( select: 'leading' | 'trailing', - newProps: $Shape, + newProps: Partial, ) => { if (select === 'leading') { if (LeadingSeparatorComponent != null) {