Skip to content

Repository files navigation

TypeScript Progress Log - 2025-10-07

Technical Achievements

  • Component Props Typing: Defined HelloProps interface to provide type safety for component properties including name, language, greeting, and paragraph parameters.
  • Type-Safe Multilingual Implementation: Created a robust translation system using:
    • Mapped types ({[K in TranslationKeys]: {[L in Language]: string}}) for type-safe translation object structure
    • Keyof operator for translation key extraction
    • Literal union types for supported languages ('EN' | 'LT')
  • Default Parameter Handling: Implemented nullish coalescing (??) for default language selection and fallback to translation defaults
  • Functional Component Patterns: Utilized destructured props in function parameters ({ name, language = 'EN', greeting, paragraph }: HelloProps) with default values
  • Modular Architecture: Separated concerns into multiple files (App.tsx, Ts1.tsx, types.ts, translations.ts) with proper import/export statements
  • HTML Semantics with TypeScript: Used fieldset/legend elements combined with CSS for visual component boundaries while maintaining accessibility
  • Responsive Layout System: Implemented flexbox container with row direction and wrapping to accommodate multiple component instances (up to 4-6 total, 2 per row)

TypeScript Progress Log - 2025-10-08

  • Context system integrated for state management across components
  • Added multiple language support "EN, LT, NL, UA"
  • Language selection implemented via navbar
  • Dynamic backgrounds with flag colors based on selected language
  • Component styling refined for better visual consistency

About

Typescript related

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages