type RawResponse = T[] | { data: T[]; } | { items: T[]; }; type ClientFetcher = () => Promise>; type ServerFetcher = (query: string) => Promise>; type Fetcher = ClientFetcher | ServerFetcher; type Mapper = (items: T[]) => R[]; export interface OptionItem { label: string; value: string | number; [key: string]: any; } export interface ToOptionsConfig { label: keyof T | ((item: T) => string); value: keyof T; } export interface NormalizedFetchResult { (filter?: string): Promise; clearCache: () => void; } export declare function toOptions(items: T[]): OptionItem[]; export declare function toOptions(config: ToOptionsConfig): Mapper; export declare function normalizedFetch(fetcher: Fetcher, mapper: Mapper, options?: { timeout?: number; }): NormalizedFetchResult; export {}; //# sourceMappingURL=fetch.d.ts.map