- feat(types): new
strictInterpolationCheckstype option (defaultfalse). WithstrictInterpolationChecks: trueinCustomTypeOptions,t()needs its options for a string with{{variables}}: for'Hello {{name}}!',t('greeting')is a type error andt('greeting', { name })compiles. Left out, the variable reaches the UI as the raw{{name}}placeholder. This applies to string keys, selectors, selector arrays andgetFixedT, and withstrictKeyChecksalso tot(key, defaultValue). Without the flag nothing changes. With the flag on, a wrapper that passes on a key type ((key: ParseKeys<'ns'>) => t(key), or a genericK extends ParseKeys) no longer compiles without options, as the variables of its string are not known there.parseInterpolation: 'icu'and'mf2'require their arguments as before. Thanks @Alex0007 (#2465). - fix(types): an array of selectors with a plural member now requires
count, as a single selector does since v25.9.0. Withoutcount, i18next skips the plural member at runtime, sot([($) => $.item, ($) => $.plain])returned theplainvalue while typed as the plural forms. An array of selectors withdefaultValuenow returns the literal values and the default value ('a' | 'b' | 'x') instead ofstring. Thanks @Alex0007 (#2465).