You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Review all type and interface definitions and usage throughout the codebase to identify opportunities for refactoring and clean up. This will help improve consistency in naming, structure, and usage of types across the project.
Specific areas to investigate:
Inconsistent naming (plural vs singular, capitalization, abbreviations, etc.)
Misnamed types that are not actually types but constants or enums
Usage of any where more specific types could be defined
Opportunities to convert usage of enums to as const types
Inheritance hierarchies that could be simplified
Re-organization of types into more logical modules/namespaces
Why is this needed?
As the project has grown organically, inconsistencies in how types are defined and used have emerged. By refactoring and cleaning these up, we can improve maintainability, clarity, and reliability of the codebase.
More consistent and intention-revealing names will also improve onboarding and comprehension as well as DX.
Converting usage to proper types where applicable will enable stronger compiler checking and editor tooling support. Overall, this refactoring will leave the code in better shape for continued development and maintenance.
Which area does this relate to?
No response
Solution
Examples of types/interfaces/objects that could be improved:
ClassThatLogs (here) might be converted to an interface, renamed, and made to include all methods
ConstructorOptions (here) could be renamed to something more explanatory like LoggerOptions or similar (check other utilities)
LogJsonIndent (here) should be moved out of this file and into a constants.ts file similar to what done in other utilities, also it should be converted to an object as we are moving away from enums.
Important
Before starting to work on a PR for this issue, the assignee should do an investigation of the code and propose an action plan under this issue.
Once the plan has been discussed and agreed upon with at least one maintainer work on the PR can start.
Summary
Review all type and interface definitions and usage throughout the codebase to identify opportunities for refactoring and clean up. This will help improve consistency in naming, structure, and usage of types across the project.
Specific areas to investigate:
anywhere more specific types could be definedas consttypesWhy is this needed?
As the project has grown organically, inconsistencies in how types are defined and used have emerged. By refactoring and cleaning these up, we can improve maintainability, clarity, and reliability of the codebase.
More consistent and intention-revealing names will also improve onboarding and comprehension as well as DX.
Converting usage to proper types where applicable will enable stronger compiler checking and editor tooling support. Overall, this refactoring will leave the code in better shape for continued development and maintenance.
Which area does this relate to?
No response
Solution
Examples of types/interfaces/objects that could be improved:
ClassThatLogs(here) might be converted to an interface, renamed, and made to include all methodsConstructorOptions(here) could be renamed to something more explanatory likeLoggerOptionsor similar (check other utilities)LogJsonIndent(here) should be moved out of this file and into aconstants.tsfile similar to what done in other utilities, also it should be converted to an object as we are moving away from enums.Important
Before starting to work on a PR for this issue, the assignee should do an investigation of the code and propose an action plan under this issue.
Once the plan has been discussed and agreed upon with at least one maintainer work on the PR can start.
Acknowledgment
Future readers
Please react with 👍 and your use case to help us understand customer demand.