Skip to content

Conversation

@Dobrunia
Copy link
Member

@Dobrunia Dobrunia commented Nov 5, 2025

Changes:

  • Converted createConsoleCatcher() factory function to ConsoleCatcher class
  • Implemented singleton pattern via static getInstance() method
  • Moved internal state (consoleOutput, isInitialized) to private class fields
  • Converted all internal functions to private/public class methods
  • Integrated ConsoleCatcher into Catcher class via instance property
  • Replaced direct function imports with class instance usage in catcher.ts

Benefits:

  • Better code organization and encapsulation
  • Easier to test and maintain
  • Consistent with other class-based modules in the codebase
  • Preserves all existing functionality without breaking changes

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.

3 participants