import { ReactNode } from 'react'; import { FieldNames } from 'rc-select/lib/Select'; export interface RemoteSearchSelectProps { /** 防抖时间(毫秒)*/ wait: number; /** 响应远程搜索的防抖函数 */ requestFn?: (keyword: string) => Promise<(Record)[]>; /** 自定义节点 label、value、options 的字段 */ fieldNames?: FieldNames; } export interface RemoteSearchSelectReturn { options: (Record)[]; notFoundContent: ReactNode | null; filterOption: boolean; showSearch: boolean; allowClear: boolean; fieldNames: FieldNames; style: object; onSearch: (...args: string[]) => void; } declare function useRemoteSearchSelect({ wait, requestFn, fieldNames }: RemoteSearchSelectProps): RemoteSearchSelectReturn; export default useRemoteSearchSelect;