anylang
Version:
A translator's kit that uses the free APIs of Google Translate, Yandex, Bing, ChatGPT, and other LLMs
18 lines (17 loc) • 367 B
TypeScript
/**
* Interface of cache
*/
export interface ICache {
/**
* Get translation
*/
get: (text: string, from: string, to: string) => Promise<string | null>;
/**
* Set translation
*/
set: (text: string, translate: string, from: string, to: string) => Promise<void>;
/**
* Clear cache
*/
clear: () => Promise<void>;
}