TypeScript types for react-instantsearch-dom

Hi everybody

I am working on some custom components using the react-instantsearch-dom package.

I am unsure where to find typeScript types for the props? Let me give you an example:

function SearchBox({ refine, currentRefinement }:SearchBoxProps) {
....
}
export default connectSearchBox(SearchBox);

Here I would need types for the “refine” and “currentRefinement” props.

I have been looking in this file:

But I am a bit unsure how to do this exactly?

Ended up defining the types manually. In the end, it was quite straightforward.

import { SetStateAction,Dispatch } from "react";

function SearchBox({ refine, currentRefinement }: {refine: Dispatch<SetStateAction<string>>, currentRefinement:string | number | readonly string[] | undefined) {
...