I am working with a function defined in an interface as shown below:
interface UseAutocompleteReturnValue {
...
getRootProps: (externalProps?: any) => React.HTMLAttributes<HTMLDivElement>;
}
Within my interface, I aim to create a prop named rootProp
which will depend on the type of the parameter externalProps
in getRootProps
. Therefore, the type in this case will be:
rootProps?: any
Is there a method for achieving this?