Skip to content

Commit

Permalink
Replace React.AbstractComponent with component type in SafeAreaView (
Browse files Browse the repository at this point in the history
…facebook#46913)

Summary:
Pull Request resolved: facebook#46913

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

Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D64104922

fbshipit-source-id: 3210b6b7368872f13f9006bb1b19de9f92aa4bc8
  • Loading branch information
fabriziocucci authored and facebook-github-bot committed Oct 10, 2024
1 parent 91a40a2 commit 46a9711
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ import * as React from 'react';
* limitation of the screen, such as rounded corners or camera notches (aka
* sensor housing area on iPhone X).
*/
const exported: React.AbstractComponent<
ViewProps,
React.ElementRef<typeof View>,
> = Platform.select({
const exported: component(
ref: React.RefSetter<React.ElementRef<typeof View>>,
...props: ViewProps
) = Platform.select({
ios: require('./RCTSafeAreaViewNativeComponent').default,
default: View,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1995,10 +1995,10 @@ declare export default typeof RCTSafeAreaViewNativeComponent;
`;

exports[`public API should not change unintentionally Libraries/Components/SafeAreaView/SafeAreaView.js 1`] = `
"declare const exported: React.AbstractComponent<
ViewProps,
React.ElementRef<typeof View>,
>;
"declare const exported: component(
ref: React.RefSetter<React.ElementRef<typeof View>>,
...props: ViewProps
);
declare export default typeof exported;
"
`;
Expand Down

0 comments on commit 46a9711

Please sign in to comment.