From 456d01747511c692820e571269176813270fef49 Mon Sep 17 00:00:00 2001 From: Reinaldo Neto <47038980+reinaldonetof@users.noreply.github.com> Date: Thu, 14 Apr 2022 14:29:32 -0300 Subject: [PATCH] Chore: Migrate REST API - getSupportedLanguagesAutoTranslate to Typescript (#4020) --- app/lib/services/restApi.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/lib/services/restApi.ts b/app/lib/services/restApi.ts index fbf5b862b..d7a140da6 100644 --- a/app/lib/services/restApi.ts +++ b/app/lib/services/restApi.ts @@ -743,7 +743,8 @@ export const saveAutoTranslate = ({ options?: { defaultLanguage: string }; }) => sdk.methodCallWrapper('autoTranslate.saveSettings', rid, field, value, options ?? null); -export const getSupportedLanguagesAutoTranslate = () => sdk.methodCallWrapper('autoTranslate.getSupportedLanguages', 'en'); +export const getSupportedLanguagesAutoTranslate = (): Promise<{ language: string; name: string }[]> => + sdk.methodCallWrapper('autoTranslate.getSupportedLanguages', 'en'); export const translateMessage = (message: any, targetLanguage: string) => sdk.methodCallWrapper('autoTranslate.translateMessage', message, targetLanguage);