Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Refactor: improve main manu option#170

Open
ysknsid25 wants to merge 2 commits intosirmalloc:mainfrom
ysknsid25:refactor/improve-main-manu-option
Open

Refactor: improve main manu option#170
ysknsid25 wants to merge 2 commits intosirmalloc:mainfrom
ysknsid25:refactor/improve-main-manu-option

Conversation

@ysknsid25
Copy link

  1. Improved type safety: By specifying Record<MainMenuOption, string> as the descriptions object in getDescription, it is now guaranteed at compile time that descriptions are defined for all menu items.
  2. Strict handling: The MainMenuOption type is now also applied to handleMainMenuSelect in App.tsx, eliminating the risk of passing non-existent values ​​in switch statements, etc.
  3. Enhanced Completion: When developing in the editor, valid strings for menu values ​​are now auto-completed.

@ysknsid25
Copy link
Author

depend on #169. After marged #169, I will open this PR.

@ysknsid25 ysknsid25 marked this pull request as ready for review February 23, 2026 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant