types
localive types [options]Options
Section titled “Options”| Option | Default | Description |
|---|---|---|
--locale-file <path> | src/locales/*.json | Locale JSON file(s) |
--out <path> | stdout | Output file path |
Output
Section titled “Output”Generates a TypeScript declaration file with a union type of all translation keys:
// Auto-generated by @localive/cliexport type TranslationKey = | 'app.title' | 'app.subtitle' | 'nav.home' | 'nav.about' | 'card.welcome' | 'card.description' | 'footer.rights';Examples
Section titled “Examples”# Output to stdoutlocalive types --locale-file src/locales/en.json
# Write to a .d.ts filelocalive types --locale-file src/locales/en.json --out src/i18n.d.ts