diff --git a/src/TranslatedError.ts b/src/TranslatedError.ts index a9bd2e1d..b92880fc 100644 --- a/src/TranslatedError.ts +++ b/src/TranslatedError.ts @@ -14,10 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import i18n from "i18next"; - -import type { ParseKeys, TFunction } from "i18next/typescript/t"; -import type { DefaultNamespace, TOptions } from "i18next/typescript/options"; +import type { DefaultNamespace, ParseKeys, TFunction, TOptions } from "i18next"; /** * An error with messages in both English and the user's preferred language. @@ -45,5 +42,5 @@ class TranslatedErrorImpl extends TranslatedError {} // function instead export const translatedError = ( messageKey: ParseKeys, - t: typeof i18n.t, + t: TFunction<"app", undefined>, ): TranslatedError => new TranslatedErrorImpl(messageKey, t); diff --git a/yarn.lock b/yarn.lock index c1e156e9..36b04989 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6042,11 +6042,11 @@ i18next-parser@^8.0.0: vue-template-compiler "^2.6.11" i18next@^23.0.0, i18next@^23.5.1: - version "23.6.0" - resolved "https://registry.yarnpkg.com/i18next/-/i18next-23.6.0.tgz#c6e996cfd3fef0bf60be3b7c581c35338dba5a71" - integrity sha512-z0Cxr0MGkt+kli306WS4nNNM++9cgt2b2VCMprY92j+AIab/oclgPxdwtTZVLP1zn5t5uo8M6uLsZmYrcjr3HA== + version "23.7.7" + resolved "https://registry.yarnpkg.com/i18next/-/i18next-23.7.7.tgz#e650ee962417186c5ba78bdaea3979abd31d3bfc" + integrity sha512-peTvdT+Lma+o0LfLFD7IC2M37N9DJ04dH0IJYOyOHRhDfLo6nK36v7LkrQH35C2l8NHiiXZqGirhKESlEb/5PA== dependencies: - "@babel/runtime" "^7.22.5" + "@babel/runtime" "^7.23.2" iconv-lite@0.6.3, iconv-lite@^0.6.3: version "0.6.3"