Skip to content

Commit

Permalink
Fix virtual list type
Browse files Browse the repository at this point in the history
  • Loading branch information
aliakbarazizi committed Nov 22, 2022
1 parent 0d3d002 commit 389f570
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions Libraries/Lists/VirtualizedList.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

import type * as React from 'react';
import type {LayoutChangeEvent} from '../../types';
import {StyleProp} from '../StyleSheet/StyleSheet';
import {ViewStyle} from '../StyleSheet/StyleSheetTypes';
import type {ScrollViewProps} from '../Components/ScrollView/ScrollView';

export interface ViewToken {
Expand Down Expand Up @@ -124,6 +126,11 @@ export interface VirtualizedListProps<ItemT>

export interface VirtualizedListWithoutRenderItemProps<ItemT>
extends ScrollViewProps {
/**
* Rendered in between each item, but not at the top or bottom
*/
ItemSeparatorComponent?: React.ComponentType<any> | null | undefined;

/**
* Rendered when the list is empty. Can be a React Component Class, a render function, or
* a rendered element.
Expand All @@ -144,6 +151,11 @@ export interface VirtualizedListWithoutRenderItemProps<ItemT>
| null
| undefined;

/**
* Styling for internal View for ListFooterComponent
*/
ListFooterComponentStyle?: StyleProp<ViewStyle> | undefined;

/**
* Rendered at the top of all the items. Can be a React Component Class, a render function, or
* a rendered element.
Expand All @@ -154,6 +166,11 @@ export interface VirtualizedListWithoutRenderItemProps<ItemT>
| null
| undefined;

/**
* Styling for internal View for ListHeaderComponent
*/
ListHeaderComponentStyle?: StyleProp<ViewStyle> | undefined;

/**
* The default accessor functions assume this is an Array<{key: string}> but you can override
* getItem, getItemCount, and keyExtractor to handle any type of index-based data.
Expand Down

0 comments on commit 389f570

Please sign in to comment.