libretranslate-extended
Version:
Extended API wrapper for LibreTranslate with built-in language detection and improvements.
14 lines (13 loc) • 352 B
TypeScript
export type DeeplConfig = {
apiKey: string;
};
type TranslateParams = {
query: string | string[];
source?: string;
target: string;
};
export declare function deeplTranslate({ query, source, target }: TranslateParams, cfg: DeeplConfig): Promise<{
text: string | string[];
detectedSourceLang?: string;
}>;
export {};