import { FullValuSearchConfig } from "../config"; import { AddressBarListener } from "../redux/search-engine"; /** * CSS helper for defining element sizes. * If there is no env variable VS_REM_DIVIDER, returns `${value}px` * If VS_REM_DIVIDER is set returns ${value / process.env.VS_REM_DIVIDER}rem * * In CDN projects set VS_REM_DIVIDER in customer/webpack.config.js * @param value */ export declare function u(value: number | string): string; declare const featureFlags: { vsExperimentalIdleThrottle: string; vsDebug: string; vsStaging: string; vsLogResponseTimes: string; }; export declare function featureFlag(flag: keyof typeof featureFlags): boolean; export declare let debug: (msg: string, ...args: any[]) => void; export declare function requestIdleCallback(cb: () => void): void; /** * Fill missing values from the partial config with the default values */ export declare function defaults(partialConfig: PartialConfig, defaultValues: Defaults): PartialConfig & Defaults; /** * Typed and simplified version of https://www.npmjs.com/package/debounce */ export declare function debounce any>(func: T, wait: number, immediate?: boolean): { (this: any, ..._args: Parameters): ReturnType | undefined; cancel(): void; }; /** * From SO, must be perfect? * https://stackoverflow.com/a/25456134/153718 */ export declare function isDeepEqual(x: any, y: any): boolean; /** * This might be unnecessary * @param options */ export declare function partialConfigIsEqual(options: { partial: Partial; config: FullValuSearchConfig; }): boolean; export declare function useInstanceId(): string; export declare function useSetSearchTerms(): (terms: string) => void; export declare function useParseSearchTerms(): (searchParams: URLSearchParams) => string; export declare function useIsSearchActive(): (searchParams: URLSearchParams) => boolean; export declare function useGetCurrentSearchTermsFromWindow(): () => string; export declare function useGetIsSearchActiveFromWindow(): () => boolean; export declare function useSetGroupIdOnWindow(): (id: string) => void; export declare function useGetGroupLinkFromWindow(): (params: { id: string; terms: string; }) => string; export declare function useGetGrouppedResultsLinkFromWindow(): () => string; export declare function useVsOpenOnWindow(): (searchTerms: string) => void; export declare function useVsCloseOnWindow(): () => void; export declare function useRemoveVSQueryParams(): (params: URLSearchParams) => URLSearchParams; export declare function useClearVSQueryParamsOnWindow(): () => void; export declare function useGetInnerLinkFromWindow(): (params?: { searchTerms?: string | undefined; groupId?: string | undefined; } | undefined) => string; export declare function usePreviousValue(value: T): T; export declare function createAddressBarListener(instanceId: string): AddressBarListener; /** * Logs the given deprecation message only once */ export declare function deprecateLog(msg: string, ...rest: any[]): void; export declare function deprecate any>(old: string, next: string, fn: Fn): Fn; export declare function deprecateSlot(old: T, next: T, slots: FullValuSearchConfig["slots"]): void; /** * @param ob Remove undefied keys from object. Just makes things cleaner for * tests */ export declare function cleanUndefined(ob: T): T; /** * Asserts that given object is not null or undefined */ export declare function assertNonNullable(ob: T, assertionMessage: string): asserts ob is NonNullable; export {};