Sourced from i18next-cli's changelog.
1.67.4
- fix(extract): resolve finite string-literal unions that reach a key through an interface- or object-typed function parameter.
interface IProps { size: ChangeType }withfunction f({ size }: IProps) { return t(`some_${size}`) }now expands to one key per union member. Covers destructured props (including renamed and defaulted ones), member access on the parameter itself (t(`some_${props.size}`)), object type aliases (type Props = { size: 'x' | 'y' }) and inline type literals. Bindings are scoped to the function, so nothing leaks to same-named identifiers elsewhere (#210).
d2da696
1.67.404de8b7
fix(extract): resolve unions via interface-typed params (#210)