lingva-scraper-update
Version:
Google Translate scraper for Lingva Translate
39 lines (38 loc) • 828 B
TypeScript
import { LangCode } from "./language";
interface DefinitionsGroup {
type: string;
list: {
definition: string;
example: string;
field?: string;
synonyms: string[];
}[];
}
interface ExtraTranslationsGroup {
type: string;
list: {
word: string;
article?: string;
frequency: number;
meanings: string[];
}[];
}
export interface TranslationInfo {
detectedSource?: LangCode<"source">;
typo?: string;
pronunciation: {
query?: string;
translation?: string;
};
definitions: DefinitionsGroup[];
examples: string[];
similar: string[];
extraTranslations: ExtraTranslationsGroup[];
}
export interface AudioEntry {
lang: {
code: LangCode<"target"> | "auto";
};
text: string;
}
export {};