You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On typescript definition FormatFunction has format, lng, options parameters marked as optional.
The fix could just add default value to options param as {}. From the looks of it it shouldn't break other checks.
馃悰 Bug Report
Using
i18n.format
function doesn't work with new formatters (i18next.services.formatter.add
).When setting format function inside
interpolation
configuration I can safely format values without passing throughi18n.t
.Now when adding a formatter with the new syntax this no longer works and a warning is issued in console:
The affected line should be this one
On typescript definition
FormatFunction
hasformat
,lng
,options
parameters marked as optional.The fix could just add default value to
options
param as{}
. From the looks of it it shouldn't break other checks.To Reproduce
"test"
string is not formattedExpected behaviour
Format function is applied to the value passed to
i18n.format
so the result should beTEST
.Your Environment
The text was updated successfully, but these errors were encountered: