i18next v26.5.2

v26.5.2
Changed 1
  • The t() typings are now written as two signatures, [key, defaultValue] and [key, defaultValue, options], so TypeScript 7 explains the correct error on a failed call
Fixed 1
  • On TypeScript 7, a t() call with a missing, misspelled or wrongly typed option now reports that option again, as TypeScript 5 and 6 do

From i18next

  • fix(types): on TypeScript 7, a t() call with a missing, misspelled or wrongly typed option now reports that option again (Property 'album' is missing, Type 'string' is not assignable to type 'number'), as TypeScript 5 and 6 do. TypeScript 7 elaborated the error against the default-value signature instead and ended in '{ count: 3; albm: "Summer"; }' is not assignable to type 'string': on a failed call TypeScript explains the last of the equally matching signatures, and TypeScript 7 sorts the 3-element [key, defaultValue, options?] last. It is now written as two signatures, [key, defaultValue] and [key, defaultValue, options]. This affects the default key checks with i18next {{name}} messages as well as parseInterpolation: 'icu' and 'mf2'. Which calls compile, their return types and the error positions are unchanged on TypeScript 5.9, 6 and 7.
View original

Upgraded? How did it go?

Discussion