diff --git a/packages/@react-aria/collections/src/useCachedChildren.ts b/packages/@react-aria/collections/src/useCachedChildren.ts index ad4ef6c61c4..1ce6c9143be 100644 --- a/packages/@react-aria/collections/src/useCachedChildren.ts +++ b/packages/@react-aria/collections/src/useCachedChildren.ts @@ -19,7 +19,7 @@ export interface CachedChildrenOptions { /** The contents of the collection. */ children?: ReactNode | ((item: T) => ReactNode), /** Values that should invalidate the item cache when using dynamic collections. */ - dependencies?: any[], + dependencies?: ReadonlyArray, /** A scope to prepend to all child item ids to ensure they are unique. */ idScope?: Key, /** Whether to add `id` and `value` props to all child items. */ diff --git a/packages/react-aria-components/src/Collection.tsx b/packages/react-aria-components/src/Collection.tsx index 7c189bc67fa..f229edf9c4c 100644 --- a/packages/react-aria-components/src/Collection.tsx +++ b/packages/react-aria-components/src/Collection.tsx @@ -19,7 +19,7 @@ export interface CollectionProps extends Omit, 'children'> /** The contents of the collection. */ children?: ReactNode | ((item: T) => ReactNode), /** Values that should invalidate the item cache when using dynamic collections. */ - dependencies?: any[] + dependencies?: ReadonlyArray } export interface ItemRenderProps { @@ -89,7 +89,7 @@ export interface SectionProps extends Omit, 'children' /** Static child items or a function to render children. */ children?: ReactNode | ((item: T) => ReactElement), /** Values that should invalidate the item cache when using dynamic collections. */ - dependencies?: any[] + dependencies?: ReadonlyArray } interface SectionContextValue { diff --git a/packages/react-aria-components/src/Table.tsx b/packages/react-aria-components/src/Table.tsx index f0010c1a9c0..e215d17921a 100644 --- a/packages/react-aria-components/src/Table.tsx +++ b/packages/react-aria-components/src/Table.tsx @@ -526,11 +526,11 @@ export interface TableHeaderRenderProps { export interface TableHeaderProps extends StyleRenderProps, HoverEvents { /** A list of table columns. */ - columns?: T[], + columns?: Iterable, /** A list of `Column(s)` or a function. If the latter, a list of columns must be provided using the `columns` prop. */ children?: ReactNode | ((item: T) => ReactElement), /** Values that should invalidate the column cache when using dynamic collections. */ - dependencies?: any[] + dependencies?: ReadonlyArray } /** @@ -989,7 +989,7 @@ export interface RowProps extends StyleRenderProps, LinkDOMPr /** The object value that this row represents. When using dynamic collections, this is set automatically. */ value?: T, /** Values that should invalidate the cell cache when using dynamic collections. */ - dependencies?: any[], + dependencies?: ReadonlyArray, /** A string representation of the row's contents, used for features like typeahead. */ textValue?: string, /** Whether the row is disabled. */