@vtex/vtexis-compatibility-layer
Version:
Compatibility layer between intelligent search and VTEX
20 lines (19 loc) • 814 B
TypeScript
export declare function distinct<T>(value: T, index: number, self: T[]): boolean;
export declare const objToNameValue: (keyName: string, valueName: string, record: Record<string, unknown> | null | undefined) => Record<string, string>[];
export declare const getFirstNonNullable: <T>(arr: T[]) => T | undefined;
export declare const getPriceRange: (searchItems: SearchItem[]) => {
sellingPrice: {
highPrice: number;
lowPrice: number;
};
listPrice: {
highPrice: number;
lowPrice: number;
};
};
export declare const dateToTicks: (dateTime: string) => number;
export declare const getTranslationInfo: (info: string, translationInfo?: {
field: string;
context: string;
translation: string;
}[] | undefined, infoId?: string | undefined) => string | undefined;