Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(logging.ts, mod.ts): add console interception to stop spinner while logging and resume after logging is done #15

Merged
merged 3 commits into from
May 23, 2023

Conversation

jupegarnica
Copy link
Contributor

This change adds a new feature to the spinner module that allows it to intercept console methods and stop the spinner while logging is being done. This is useful to avoid the spinner animation interfering with the logs. After the logging is done, the spinner resumes its animation. The feature is enabled by default but can be disabled by setting the interceptConsole option to false. The logging.ts file is an example of how to use this feature.

…ile logging and resume after logging is done

This change adds a new feature to the spinner module that allows it to intercept console methods and stop the spinner while logging is being done. This is useful to avoid the spinner animation interfering with the logs. After the logging is done, the spinner resumes its animation. The feature is enabled by default but can be disabled by setting the `interceptConsole` option to `false`. The `logging.ts` file is an example of how to use this feature.
feat(Spinner): add support for intercepting console methods to allow for logging during spinner execution
…d improve type safety in Spinner class by using Console interface instead of any for console object methods
Copy link
Member

@eliassjogreen eliassjogreen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Great work!

@eliassjogreen eliassjogreen merged commit f4206f9 into denosaurs:main May 23, 2023
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.

2 participants