UNPKG

@particular.cloud/i18n-js

Version:

The i18n javascript and typescript sdk of particular.cloud

11 lines (10 loc) 492 B
import { Key, LangCodeOrLocale, TextValue } from './TranslationRecords'; declare type Expired = boolean; declare type RetrieveValue = [TextValue | undefined, Expired]; interface CustomCache { retrieve(key: Key, language: LangCodeOrLocale): Promise<TextValue | undefined | RetrieveValue>; put(key: Key, language: LangCodeOrLocale, value: TextValue): Promise<void>; keys?(): Promise<[LangCodeOrLocale, Key][]>; } export type { RetrieveValue }; export default CustomCache;