Skip to content

Commit

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

Summary:
Pull Request resolved: facebook#46951

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

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D64175898

fbshipit-source-id: 4db76dda0c4ac604c38dc3acf5bc39448cad006e
  • Loading branch information
fabriziocucci authored and facebook-github-bot committed Oct 11, 2024
1 parent bcb6daf commit c09f824
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 @@ -153,10 +153,10 @@ const ActivityIndicator = (
```
*/

const ActivityIndicatorWithRef: React.AbstractComponent<
Props,
HostComponent<mixed>,
> = React.forwardRef(ActivityIndicator);
const ActivityIndicatorWithRef: component(
ref: React.RefSetter<HostComponent<mixed>>,
...props: Props
) = React.forwardRef(ActivityIndicator);
ActivityIndicatorWithRef.displayName = 'ActivityIndicator';

const styles = StyleSheet.create({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1657,10 +1657,10 @@ type Props = $ReadOnly<{|
color?: ?ColorValue,
size?: ?IndicatorSize,
|}>;
declare const ActivityIndicatorWithRef: React.AbstractComponent<
Props,
HostComponent<mixed>,
>;
declare const ActivityIndicatorWithRef: component(
ref: React.RefSetter<HostComponent<mixed>>,
...props: Props
);
declare export default typeof ActivityIndicatorWithRef;
"
`;
Expand Down

0 comments on commit c09f824

Please sign in to comment.