I18n/23/I18next Replace Keyswithseparator With Joinkeys

/icons/calendar.svg

Last update

Sep 4, 2024

Renaming types or functions can be part of an effort to clarify the library's API, deprecate old functionality, or introduce new features. In this case, KeysWithSeparator has been renamed to JoinKeys. This means wherever KeysWithSeparator was used in the codebase, it needs to be replaced with JoinKeys.

Example

Before

import { KeysWithSeparator } from 'i18next';
const myTranslationFunction = (key: KeysWithSeparator < string > ) => {
// Function body remains the same
};

After

import { JoinKeys } from 'i18next';
const myTranslationFunction = (key: JoinKeys < string > ) => {
// Function body remains the same
};

Build custom codemods

Use AI-powered codemod studio and automate undifferentiated tasks for yourself, colleagues or the community

background illustrationGet Started Now