The resolveTypeNames function in lib/metamodelutil.js currently uses a long switch‑case to handle multiple metamodel classes. This implementation makes the code harder to read, maintain.
Proposed Solution:
- Break Down Functionality: Refactor
resolveTypeNames into smaller, more focused helper functions. For example, create separate functions for handling each type of declaration (assets, concepts, transactions, etc.).
- Abstract Common Logic: Identify and extract any common operations between the different cases into shared utility functions.
Benefits:
- Improved readability and maintainability of the codebase.
- Easier future enhancements and debugging.