Created
March 7, 2025 13:40
-
-
Save nico-i/c0558df951f4690cbecd9aeb3710b7c9 to your computer and use it in GitHub Desktop.
Custom type for all valid i18next translation keys prefixed by their respective namespace.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import type { FlatNamespace, ParseKeys } from 'i18next'; | |
export type AllI18nKeysWithNsPrefix = { | |
[Ns in FlatNamespace]: `${Ns}:${ParseKeys<Ns>}`; | |
}[FlatNamespace]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment