UNPKG

deepl-node

Version:

deepl-node is the official DeepL Node.js client library

29 lines (28 loc) 1.12 kB
import { Translator } from './translator'; import { SourceLanguageCode, DeepLClientOptions, WriteResult } from './types'; export declare enum WritingStyle { ACADEMIC = "academic", BUSINESS = "business", CASUAL = "casual", DEFAULT = "default", PREFER_ACADEMIC = "prefer_academic", PREFER_BUSINESS = "prefer_business", PREFER_CASUAL = "prefer_casual", PREFER_SIMPLE = "prefer_simple", SIMPLE = "simple" } export declare enum WritingTone { CONFIDENT = "confident", DEFAULT = "default", DIPLOMATIC = "diplomatic", ENTHUSIASTIC = "enthusiastic", FRIENDLY = "friendly", PREFER_CONFIDENT = "prefer_confident", PREFER_DIPLOMATIC = "prefer_diplomatic", PREFER_ENTHUSIASTIC = "prefer_enthusiastic", PREFER_FRIENDLY = "prefer_friendly" } export declare class DeepLClient extends Translator { constructor(authKey: string, options?: DeepLClientOptions); rephraseText<T extends string | string[]>(texts: T, targetLang: SourceLanguageCode | null, writingStyle?: string | null, tone?: string | null): Promise<T extends string ? WriteResult : WriteResult[]>; }