Pokedex
    Preparing search index...

    Interface for translating text via an external source

    interface ClientInterface {
        getTranslation(
            translationType: string,
            text: string,
        ): Promise<Result<Error, string>>;
    }

    Implemented by

    Index

    Methods

    • Translates text using a specified translation type

      Parameters

      • translationType: string

        The type of translation to apply (e.g., 'yoda', 'shakespeare')

      • text: string

        The text to translate

      Returns Promise<Result<Error, string>>

      A promise resolving to a Result containing either the translated text or an Error