Search code examples
reactjsreact-nativei18next

what is the type of i18next " t " variable (TYPESCRIPT)


I use i18next and I want to pass the t function prop to my interface.

exp:

const { t } = useTranslation();

export interface ITranslate {
   translate: ... type?
}

what is the type of the " t " variable ?


Solution

  • maybe this will work:

    import { TFunction } from "react-i18next";
    
    export interface ITranslate {
       translate: TFunction
    }