UNPKG

nest-translate

Version:
13 lines (12 loc) 542 B
import { AxiosRequestConfig } from 'axios'; import { ITranslateOptions, ITranslateApiConfig, ITranslateBaiduResponse } from './translate.interface'; export declare class TranslateBaiduService { private options; constructor(options: ITranslateOptions); private readonly server; request(config: AxiosRequestConfig): Promise<any>; getSalt(): string; getSign(q: string, salt: string): string; getUrl(config: ITranslateApiConfig): string; translate(config: ITranslateApiConfig): Promise<ITranslateBaiduResponse>; }