Skip to main content

Interface: TFunction<N, TKPrefix, ActualNS>

i18next/src.TFunction

Type parameters

NameType
Nextends Namespace = DefaultNamespace
TKPrefixundefined
ActualNSextends Namespace = N extends null ? DefaultNamespace : N

Callable

TFunction

TFunction<TKeys, TDefaultResult, TInterpolationMap>(key): TFuncReturn<N, TKeys, TDefaultResult, TKPrefix, object>

Type parameters

NameType
TKeysextends unknown
TDefaultResultextends DefaultTFuncReturn = string
TInterpolationMapextends object = StringMap

Parameters

NameType
keyTKeys | TKeys[]

Returns

TFuncReturn<N, TKeys, TDefaultResult, TKPrefix, object>

Defined in

node_modules/i18next/index.d.ts:887

TFunction

TFunction<TKeys, TDefaultResult, TInterpolationMap, PassedNS>(key): TFuncReturn<PassedNS, TKeys, TDefaultResult, TKPrefix, object>

Type parameters

NameType
TKeysextends string
TDefaultResultextends DefaultTFuncReturn = string
TInterpolationMapextends object = StringMap
PassedNSextends Namespace<string> = N extends string ? N : N extends unknown ? "translation" : N

Parameters

NameType
keyTKeys | TKeys[]

Returns

TFuncReturn<PassedNS, TKeys, TDefaultResult, TKPrefix, object>

Defined in

node_modules/i18next/index.d.ts:894

TFunction

TFunction<TKeys, TDefaultResult, TInterpolationMap, PassedNS>(key, options): TFunctionDetailedResult<TFuncReturn<ActualNS, TKeys, TDefaultResult, TKPrefix, object>>

Type parameters

NameType
TKeysextends string
TDefaultResultextends DefaultTFuncReturnWithObject = object
TInterpolationMapextends object = StringMap
PassedNSextends Namespace<string> = N extends string ? N : N extends null ? "translation" : N

Parameters

NameType
keyTKeys | TKeys[]
optionsTOptionsBase & TInterpolationMap & { ns: PassedNS ; returnDetails: true ; returnObjects: true }

Returns

TFunctionDetailedResult<TFuncReturn<ActualNS, TKeys, TDefaultResult, TKPrefix, object>>

Defined in

node_modules/i18next/index.d.ts:904

TFunction

TFunction<TKeys, TDefaultResult, TInterpolationMap, PassedNS>(key, options): TFuncReturn<PassedNS, TKeys, TDefaultResult, TKPrefix, object>

Type parameters

NameType
TKeysextends string
TDefaultResultextends DefaultTFuncReturnWithObject = object
TInterpolationMapextends object = StringMap
PassedNSextends Namespace<string> = N extends string ? N : N extends null ? "translation" : N

Parameters

NameType
keyTKeys | TKeys[]
optionsTOptionsBase & TInterpolationMap & { ns: PassedNS ; returnObjects: true }

Returns

TFuncReturn<PassedNS, TKeys, TDefaultResult, TKPrefix, object>

Defined in

node_modules/i18next/index.d.ts:919

TFunction

TFunction<TKeys, TDefaultResult, TInterpolationMap, PassedNS>(key, options): TFuncReturn<PassedNS, TKeys, TDefaultResult, TKPrefix, object>

Type parameters

NameType
TKeysextends string
TDefaultResultextends DefaultTFuncReturn = string
TInterpolationMapextends object = StringMap
PassedNSextends Namespace<string> = N extends string ? N : N extends null ? "translation" : N

Parameters

NameType
keyTKeys | TKeys[]
optionsTOptionsBase & TInterpolationMap & { ns: PassedNS }

Returns

TFuncReturn<PassedNS, TKeys, TDefaultResult, TKPrefix, object>

Defined in

node_modules/i18next/index.d.ts:930

TFunction

TFunction<TKeys, TDefaultResult, TInterpolationMap>(key, options): TFunctionDetailedResult<TFuncReturn<ActualNS, TKeys, TDefaultResult, TKPrefix, object>>

Type parameters

NameType
TKeysextends unknown
TDefaultResultextends DefaultTFuncReturnWithObject = object
TInterpolationMapextends object = StringMap

Parameters

NameType
keyTKeys | TKeys[]
optionsTOptionsBase & TInterpolationMap & { returnDetails: true ; returnObjects: true }

Returns

TFunctionDetailedResult<TFuncReturn<ActualNS, TKeys, TDefaultResult, TKPrefix, object>>

Defined in

node_modules/i18next/index.d.ts:941

TFunction

TFunction<TKeys, TDefaultResult, TInterpolationMap>(key, options): TFunctionDetailedResult<TFuncReturn<ActualNS, TKeys, TDefaultResult, TKPrefix, object>>

Type parameters

NameType
TKeysextends unknown
TDefaultResultextends DefaultTFuncReturn = string
TInterpolationMapextends object = StringMap

Parameters

NameType
keyTKeys | TKeys[]
optionsTOptionsBase & TInterpolationMap & { returnDetails: true }

Returns

TFunctionDetailedResult<TFuncReturn<ActualNS, TKeys, TDefaultResult, TKPrefix, object>>

Defined in

node_modules/i18next/index.d.ts:951

TFunction

TFunction<TKeys, TDefaultResult, TInterpolationMap>(key, options): TFuncReturn<ActualNS, TKeys, TDefaultResult, TKPrefix, object>

Type parameters

NameType
TKeysextends unknown
TDefaultResultextends DefaultTFuncReturnWithObject = object
TInterpolationMapextends object = StringMap

Parameters

NameType
keyTKeys | TKeys[]
optionsTOptionsBase & TInterpolationMap & { returnObjects: true }

Returns

TFuncReturn<ActualNS, TKeys, TDefaultResult, TKPrefix, object>

Defined in

node_modules/i18next/index.d.ts:961

TFunction

TFunction<TKeys, TDefaultResult, TInterpolationMap, PassedNS, PassedOpt, UsedNS>(key, options): TFuncReturn<UsedNS, TKeys, TDefaultResult, TKPrefix, object>

Type parameters

NameType
TKeysextends string
TDefaultResultextends DefaultTFuncReturn = string
TInterpolationMapextends object = StringMap
PassedNSextends Namespace<string> = N extends string ? N : N extends null ? "translation" : N
PassedOptextends TOptionsBase & object = TOptions<TInterpolationMap>
UsedNSextends Namespace<string> = Pick<PassedOpt, "ns"> extends { ns: string } ? PassedNS : "translation" | ActualNS

Parameters

NameType
keyTKeys | TKeys[]
optionsPassedOpt

Returns

TFuncReturn<UsedNS, TKeys, TDefaultResult, TKPrefix, object>

Defined in

node_modules/i18next/index.d.ts:971

TFunction

TFunction<TKeys, TDefaultResult, TInterpolationMap>(key, defaultValue, options?): TFuncReturn<ActualNS, TKeys, TDefaultResult, TKPrefix, object>

Type parameters

NameType
TKeysextends unknown
TDefaultResultextends DefaultTFuncReturn = string
TInterpolationMapextends object = StringMap

Parameters

NameType
keyTKeys | TKeys[]
defaultValuestring
options?string | TOptions<TInterpolationMap>

Returns

TFuncReturn<ActualNS, TKeys, TDefaultResult, TKPrefix, object>

Defined in

node_modules/i18next/index.d.ts:994

TFunction

TFunction<TDefaultResult, TInterpolationMap>(key, defaultValue, options?): TFuncReturn<ActualNS, string, TDefaultResult, TKPrefix, object>

Type parameters

NameType
TDefaultResultextends DefaultTFuncReturn = string
TInterpolationMapextends object = StringMap

Parameters

NameType
keystring | string[]
defaultValuestring
options?string | TOptions<TInterpolationMap>

Returns

TFuncReturn<ActualNS, string, TDefaultResult, TKPrefix, object>

Defined in

node_modules/i18next/index.d.ts:1003

TFunction

TFunction<TDefaultResult, TInterpolationMap>(key, options): TFuncReturn<ActualNS, string, TDefaultResult, TKPrefix, object>

Type parameters

NameType
TDefaultResultextends DefaultTFuncReturn = string
TInterpolationMapextends object = StringMap

Parameters

NameType
keystring | string[]
optionsTOptionsBase & TInterpolationMap & { defaultValue: string }

Returns

TFuncReturn<ActualNS, string, TDefaultResult, TKPrefix, object>

Defined in

node_modules/i18next/index.d.ts:1013