Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/react-native/Libraries/Animated/AnimatedExports.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const Animated: typeof AnimatedImplementation = Platform.isDisableAnimations
: AnimatedImplementation;

export default {
get FlatList(): AnimatedFlatList {
get FlatList(): AnimatedFlatList<any> {
return require('./components/AnimatedFlatList').default;
},
get Image(): AnimatedImage {
Expand All @@ -33,7 +33,7 @@ export default {
get ScrollView(): AnimatedScrollView {
return require('./components/AnimatedScrollView').default;
},
get SectionList(): AnimatedSectionList {
get SectionList(): AnimatedSectionList<any, any> {
return require('./components/AnimatedSectionList').default;
},
get Text(): AnimatedText {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@
* @format
*/

import type {AnimatedComponentType} from '../createAnimatedComponent';
import type {AnimatedProps} from '../createAnimatedComponent';

import FlatList from '../../Lists/FlatList';
import FlatList, {type FlatListProps} from '../../Lists/FlatList';
import createAnimatedComponent from '../createAnimatedComponent';
import * as React from 'react';

export default (createAnimatedComponent(FlatList): AnimatedComponentType<
React.ElementConfig<typeof FlatList>,
FlatList<mixed>,
>);
// $FlowExpectedError[unclear-type]
export default (createAnimatedComponent(FlatList): component<ItemT = any>(
ref?: React.RefSetter<FlatList<ItemT>>,
...props: AnimatedProps<FlatListProps<ItemT>>
));
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,19 @@
* @format
*/

import type {SectionBase} from '../../Lists/SectionList';
import type {AnimatedComponentType} from '../createAnimatedComponent';
import type {AnimatedProps} from '../createAnimatedComponent';

import SectionList from '../../Lists/SectionList';
import SectionList, {type SectionListProps} from '../../Lists/SectionList';
import createAnimatedComponent from '../createAnimatedComponent';
import * as React from 'react';

export default (createAnimatedComponent(SectionList): AnimatedComponentType<
React.ElementConfig<typeof SectionList>,
// $FlowFixMe
export default (createAnimatedComponent(SectionList): component<
// $FlowExpectedError[unclear-type]
SectionList<any, SectionBase<any>>,
>);
ItemT = any,
// $FlowExpectedError[unclear-type]
SectionT = any,
>(
ref?: React.RefSetter<SectionList<ItemT, SectionT>>,
...props: AnimatedProps<SectionListProps<ItemT, SectionT>>
));
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,10 @@ declare export class AnimatedEvent {
exports[`public API should not change unintentionally Libraries/Animated/AnimatedExports.js 1`] = `
"declare const Animated: typeof AnimatedImplementation;
declare export default {
get FlatList(): AnimatedFlatList,
get FlatList(): AnimatedFlatList<any>,
get Image(): AnimatedImage,
get ScrollView(): AnimatedScrollView,
get SectionList(): AnimatedSectionList,
get SectionList(): AnimatedSectionList<any, any>,
get Text(): AnimatedText,
get View(): AnimatedView,
...typeof Animated,
Expand Down Expand Up @@ -614,10 +614,10 @@ exports[`public API should not change unintentionally Libraries/Animated/bezier.
`;

exports[`public API should not change unintentionally Libraries/Animated/components/AnimatedFlatList.js 1`] = `
"declare export default AnimatedComponentType<
React.ElementConfig<typeof FlatList>,
FlatList<mixed>,
>;
"declare export default component<ItemT = any>(
ref?: React.RefSetter<FlatList<ItemT>>,
...props: AnimatedProps<FlatListProps<ItemT>>
);
"
`;

Expand All @@ -641,10 +641,10 @@ declare export default typeof AnimatedScrollView;
`;

exports[`public API should not change unintentionally Libraries/Animated/components/AnimatedSectionList.js 1`] = `
"declare export default AnimatedComponentType<
React.ElementConfig<typeof SectionList>,
SectionList<any, SectionBase<any>>,
>;
"declare export default component<ItemT = any, SectionT = any>(
ref?: React.RefSetter<SectionList<ItemT, SectionT>>,
...props: AnimatedProps<SectionListProps<ItemT, SectionT>>
);
"
`;

Expand Down
Loading