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 SafeAreaView (#46913)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/46913 Prepare for the ref-as-prop typing change in flow. Changelog: [Internal] Reviewed By: SamChou19815 Differential Revision: D64104922 fbshipit-source-id: 3210b6b7368872f13f9006bb1b19de9f92aa4bc8
This commit is contained in:
committed by
Facebook GitHub Bot
parent
91a40a28de
commit
46a9711454
@@ -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,
|
||||
});
|
||||
|
||||
@@ -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;
|
||||
"
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user