refactor: reorganize project structure and improve type definitions
- Split types into separate modules for better organization - Move data files to dedicated directories with proper documentation - Enhance i18n utilities with better type safety and performance - Maintain backward compatibility with legacy imports
This commit is contained in:
36
src/types/i18n.ts
Normal file
36
src/types/i18n.ts
Normal file
@@ -0,0 +1,36 @@
|
||||
/**
|
||||
* Internationalization types module
|
||||
* Contains type definitions for i18n functionality
|
||||
*/
|
||||
import { languages } from '@/i18n/translations';
|
||||
|
||||
/**
|
||||
* Language type definition
|
||||
*/
|
||||
export type Lang = keyof typeof languages;
|
||||
|
||||
/**
|
||||
* UI translation keys type
|
||||
*/
|
||||
export type UiKeys = string;
|
||||
|
||||
/**
|
||||
* Language switcher component props
|
||||
*/
|
||||
export interface LanguageSwitcherProps {
|
||||
lang: Lang;
|
||||
}
|
||||
|
||||
/**
|
||||
* Glass header component props
|
||||
*/
|
||||
export interface GlassHeaderProps {
|
||||
lang: Lang;
|
||||
}
|
||||
|
||||
/**
|
||||
* Footer component props
|
||||
*/
|
||||
export interface FooterProps {
|
||||
lang?: Lang;
|
||||
}
|
||||
Reference in New Issue
Block a user