Why is TFunctionResult is not assignable to 'string'?
I have to pass it as {t("my-translation") as string} as a workaround.
Does anyone know any other workarounds?
If you search across this entire repo for TFunctionResult, you will not find it. I suggest you open an issue in the appropriate repo.
I passed type string to t function as t is generic function like this -> t<string>("my-translation")
I ended up specifying t as any to get past this issue. No idea why it is happening and it's also not happening for all translation usage in the entire app, just a few spots.
const { t }: { t: any } = useTranslation()
It happened to us after an update of several libs, we're still trying to figure out, what's the underlying cause here, as this code has compiled this way before....
@mugwump - root declaration is here https://github.com/i18next/i18next/blob/master/index.d.ts#L653
Also this comment might be of some interest? https://github.com/i18next/i18next/issues/1504#issuecomment-742727015
Most helpful comment
If you search across this entire repo for
TFunctionResult, you will not find it. I suggest you open an issue in the appropriate repo.