libretranslate-extended
Version:
Extended API wrapper for LibreTranslate with built-in language detection and improvements.
13 lines (12 loc) • 325 B
TypeScript
export type Provider = "libretranslate" | "ftapi" | "deepl";
export type ClientConfig = {
provider?: Provider;
baseUrl?: string;
apiKey?: string;
};
export type TranslateOptions = ClientConfig & {
query: string | string[];
source?: string;
target: string;
format?: "text" | "html";
};