UNPKG

anylang

Version:

A translator's kit that uses the free APIs of Google Translate, Yandex, Bing, ChatGPT, and other LLMs

19 lines (18 loc) 728 B
import { BaseTranslator } from '../BaseTranslator'; export declare class MicrosoftTranslator extends BaseTranslator<{ tokenLifetime?: number; }> { static readonly translatorName = "MicrosoftTranslator"; static isSupportedAutoFrom: () => boolean; static getSupportedLanguages(): string[]; getLengthLimit(): number; getRequestsTimeout(): number; checkLimitExceeding(text: string | string[]): number; translate(text: string, from: string, to: string): Promise<string>; translateBatch(text: string[], from: string, to: string): Promise<string[]>; protected token: { value: string; issuedAt: number; } | Promise<string> | null; protected getToken(): Promise<string>; }