> 1 | import type { ReduceOptions } from './types';
| ^
2 | export declare const reduceGroupedOptions: ReduceOptions<any, any, any>;
Getting this error in typeScript while using react select async paginate Using this format.
<AsyncPaginate value={value} loadOptions={loadOptions} onChange={setValue} />
loadOption
async function loadOptions(search: string, loadedOptions: any) {
const response = await fetch(`/awesome-api-url/?search=${search}&offset=${loadedOptions.length}`);
const responseJSON = await response.json();
return {
options: responseJSON.results,
hasMore: responseJSON.has_more,
};
}