Change it to a generic that's inferred from the function passed via useDataState. We can then take it steps further from there, for example in the initialFilter, which could then be changed to Partial<Record<keyof filter-related function parameter, corresponding value type>>.
Change it to a generic that's inferred from the function passed via useDataState. We can then take it steps further from there, for example in the initialFilter, which could then be changed to Partial<Record<keyof filter-related function parameter, corresponding value type>>.