Skip to content

Commit 370856f

Browse files
bhollisaleclarson
authored andcommitted
Allow arrays for enter/leave/update in useTransition typings (#625)
The code/docs allows for `enter`, `leave`, and `update` to be arrays, but the typings didn't, and this fixes that.
1 parent 756ea39 commit 370856f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

types/web.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,16 +183,16 @@ export interface UseTransitionProps<TItem, DS extends object>
183183
* Values that apply to new elements, or: item => values
184184
* @default {}
185185
*/
186-
enter?: InferFrom<DS> | ((item: TItem) => InferFrom<DS>)
186+
enter?: InferFrom<DS> | InferFrom<DS>[] | ((item: TItem) => InferFrom<DS>)
187187
/**
188188
* Values that apply to leaving elements, or: item => values
189189
* @default {}
190190
*/
191-
leave?: InferFrom<DS> | ((item: TItem) => InferFrom<DS>)
191+
leave?: InferFrom<DS> | InferFrom<DS>[] | ((item: TItem) => InferFrom<DS>)
192192
/**
193193
* Values that apply to elements that are neither entering nor leaving (you can use this to update present elements), or: item => values
194194
*/
195-
update?: InferFrom<DS> | ((item: TItem) => InferFrom<DS>)
195+
update?: InferFrom<DS> | InferFrom<DS>[] | ((item: TItem) => InferFrom<DS>)
196196
/**
197197
* Initial (first time) base values, optional (can be null)
198198
*/

0 commit comments

Comments
 (0)