Replace React.AbstractComponent with component type in Pressable (#46950)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46950

Prepare for the ref-as-prop typing change in flow.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D64175859

fbshipit-source-id: 56c3fe658a372b5148952850166781b733bbb37a
This commit is contained in:
Fabrizio Cucci
2024-10-11 06:53:43 -07:00
committed by Facebook GitHub Bot
parent ce5358866f
commit bcb6dafedc
2 changed files with 8 additions and 8 deletions
@@ -363,7 +363,7 @@ function usePressState(forcePressed: boolean): [boolean, (boolean) => void] {
const MemoedPressable = React.memo(React.forwardRef(Pressable));
MemoedPressable.displayName = 'Pressable';
export default (MemoedPressable: React.AbstractComponent<
Props,
React.ElementRef<typeof View>,
>);
export default (MemoedPressable: component(
ref: React.RefSetter<React.ElementRef<typeof View>>,
...props: Props
));
@@ -1891,10 +1891,10 @@ type Props = $ReadOnly<{|
unstable_pressDelay?: ?number,
\\"aria-label\\"?: ?string,
|}>;
declare export default React.AbstractComponent<
Props,
React.ElementRef<typeof View>,
>;
declare export default component(
ref: React.RefSetter<React.ElementRef<typeof View>>,
...props: Props
);
"
`;