Bluesky app fork with some witchin' additions 馃挮
witchsky.app
bluesky
fork
client
1import {type TranslationTaskResult} from '@bsky.app/expo-translate-text/build/ExpoTranslateText.types'
2
3export type TranslationState =
4 | {status: 'idle'}
5 | {status: 'loading'}
6 | {
7 status: 'success'
8 translatedText: string
9 sourceLanguage: TranslationTaskResult['sourceLanguage']
10 targetLanguage: TranslationTaskResult['targetLanguage']
11 }
12 | {
13 status: 'error'
14 message: string
15 }
16
17export type TranslationFunctionParams = {
18 /**
19 * The text to be translated.
20 */
21 text: string
22 /**
23 * The language to translate the text into.
24 */
25 targetLangCode: string
26 /**
27 * The source language of the text. Will auto-detect if not provided.
28 */
29 sourceLangCode?: string
30}
31
32export type TranslationFunction = (
33 parameters: TranslationFunctionParams,
34) => Promise<void>