Function: resolveKey()
Resolves a key and its parameters.
Since
2.0.0
Param
The target to fetch the language key from.
Remark
This function also has additional parameters for key
, defaultValue
, and options
, however
TSDoc does not let us document those while matching proper implementation. See the overloads for this method
for the documentation on those parameters.
Call Signature
resolveKey<
Key
,TOpt
,Ret
,Ns
,ActualOptions
>(target
:Target
,key
:Key
|Key
[],options?
:ActualOptions
):Promise
<TFunctionReturnOptionalDetails
<Ret
,TOpt
>>
Defined in: projects/plugins/packages/i18next/src/lib/functions.ts:86
Resolves a key and its parameters.
Type Parameters
Type Parameter | Default type |
---|---|
Key extends string | - |
TOpt extends TOptions | TOptions |
Ret extends string | $SpecialObject | TOpt ["returnObjects" ] extends true ? $SpecialObject : string |
Ns extends Namespace | "translation" |
ActualOptions extends TOptionsBase & $Dictionary | TOpt & InterpolationMap <Ret > |
Parameters
Parameter | Type | Description |
---|---|---|
target | Target | The target to fetch the language key from. |
key | Key | Key [] | The i18next key. |
options? | ActualOptions | The options to be passed to TFunction. |
Returns
Promise
<TFunctionReturnOptionalDetails
<Ret
, TOpt
>>
The data that key
held, processed by i18next.
Since
2.0.0
Param
The target to fetch the language key from.
Remark
This function also has additional parameters for key
, defaultValue
, and options
, however
TSDoc does not let us document those while matching proper implementation. See the overloads for this method
for the documentation on those parameters.
Since
2.0.0
Call Signature
resolveKey<
Key
,TOpt
,Ret
,Ns
,ActualOptions
>(target
:Target
,key
:string
|string
[],options
:TOpt
&$Dictionary
&object
):Promise
<TFunctionReturnOptionalDetails
<Ret
,TOpt
>>
Defined in: projects/plugins/packages/i18next/src/lib/functions.ts:102
Resolves a key and its parameters.
Type Parameters
Type Parameter | Default type |
---|---|
Key extends string | - |
TOpt extends TOptions | TOptions |
Ret extends string | $SpecialObject | TOpt ["returnObjects" ] extends true ? $SpecialObject : string |
Ns extends Namespace | "translation" |
ActualOptions extends TOptionsBase & $Dictionary | TOpt & InterpolationMap <Ret > |
Parameters
Parameter | Type | Description |
---|---|---|
target | Target | The target to fetch the language key from. |
key | string | string [] | The i18next key. |
options | TOpt & $Dictionary & object | The interpolation options as well as a defaultValue for the key and any key/value pairs. |
Returns
Promise
<TFunctionReturnOptionalDetails
<Ret
, TOpt
>>
The data that key
held, processed by i18next.
Since
2.0.0
Param
The target to fetch the language key from.
Remark
This function also has additional parameters for key
, defaultValue
, and options
, however
TSDoc does not let us document those while matching proper implementation. See the overloads for this method
for the documentation on those parameters.
Since
2.0.0
Call Signature
resolveKey<
Key
,TOpt
,Ret
,Ns
,ActualOptions
>(target
:Target
,key
:string
|string
[],defaultValue
:string
,options?
:TOpt
&$Dictionary
):Promise
<TFunctionReturnOptionalDetails
<Ret
,TOpt
>>
Defined in: projects/plugins/packages/i18next/src/lib/functions.ts:119
Resolves a key and its parameters.
Type Parameters
Type Parameter | Default type |
---|---|
Key extends string | - |
TOpt extends TOptions | TOptions |
Ret extends string | $SpecialObject | TOpt ["returnObjects" ] extends true ? $SpecialObject : string |
Ns extends Namespace | "translation" |
ActualOptions extends TOptionsBase & $Dictionary | TOpt & InterpolationMap <Ret > |
Parameters
Parameter | Type | Description |
---|---|---|
target | Target | The target to fetch the language key from. |
key | string | string [] | The i18next key. |
defaultValue | string | The default value to use if the key is not found. |
options? | TOpt & $Dictionary | The interpolation options. |
Returns
Promise
<TFunctionReturnOptionalDetails
<Ret
, TOpt
>>
The data that key
held, processed by i18next.
Since
2.0.0
Param
The target to fetch the language key from.
Remark
This function also has additional parameters for key
, defaultValue
, and options
, however
TSDoc does not let us document those while matching proper implementation. See the overloads for this method
for the documentation on those parameters.
Since
2.0.0