Skip to content

Commit 2b73aba

Browse files
extract actions type in its seperate type to support picking just one function
1 parent 0035e38 commit 2b73aba

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

src/types.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1+
export type Actions = {
2+
search: (query: string) => void
3+
clear: () => void
4+
setPage: (page: number) => void
5+
}
6+
17
export type UseSearchAndPagination = {
28
search: string
39
page: number
410
size: number
5-
actions: {
6-
search: (query: string) => void
7-
clear: () => void
8-
setPage: (page: number) => void
9-
}
11+
actions: Actions
1012
}

0 commit comments

Comments
 (0)