TypeScript Type Improvements
Follow-up from the string deduplication and HF write support work. These are internal code quality improvements that don't change behavior.
Tasks
Context
The CardType constant object and CardTypeName type already exist in src/lib/constants.ts. The Fob→Tag rename was deferred during the terminology normalization pass to keep that PR focused on user-facing strings.
TypeScript Type Improvements
Follow-up from the string deduplication and HF write support work. These are internal code quality improvements that don't change behavior.
Tasks
CardInfo.type: Change fromstringtoCardTypeName(the union type fromconstants.ts). This will give type-checking on switch statements and prevent invalid card types at compile time.Fob→Tagin interfaces and store functions: Internal code still uses "fob" naming (Fobinterface,saveFob(),loadFobs(),getFob(),fobs.json). Align with the "tag" terminology used in all user-facing strings. This is a larger rename that touches store, commands, and tests.cloneCommand()return type could encode the expected arguments at the type level (e.g., discriminated union per card type).Context
The
CardTypeconstant object andCardTypeNametype already exist insrc/lib/constants.ts. The Fob→Tag rename was deferred during the terminology normalization pass to keep that PR focused on user-facing strings.