mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
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:
committed by
Facebook GitHub Bot
parent
ce5358866f
commit
bcb6dafedc
@@ -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
|
||||
);
|
||||
"
|
||||
`;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user