DittoTranslator: move provider to top of interface

This commit is contained in:
Alex Gleason 2024-10-10 14:14:29 -05:00
parent 12d643e150
commit 655e94ef91
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

View file

@ -2,6 +2,8 @@ import type { LanguageCode } from 'iso-639-1';
/** DittoTranslator class, used for status translation. */
export interface DittoTranslator {
/** Provider name, eg `DeepL.com` */
provider: string;
/** Translate the 'content' into 'targetLanguage'. */
translate(
/** Texts to translate. */
@ -13,6 +15,4 @@ export interface DittoTranslator {
/** Custom options. */
opts?: { signal?: AbortSignal },
): Promise<{ results: string[]; source_lang: LanguageCode }>;
/** Provider name, eg `DeepL.com` */
provider: string;
}