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

Replace console.foo with helper functions #21

Merged
merged 3 commits into from
Feb 20, 2024
Merged

Replace console.foo with helper functions #21

merged 3 commits into from
Feb 20, 2024

Conversation

nbrahms
Copy link
Contributor

@nbrahms nbrahms commented Feb 20, 2024

Allows us to:

  • Intercept these methods at test time
  • Duplicate output streams (e.g. to a log file)

Also completely removes unused permission.ts file.

Allows us to:
- Intercept these methods at test time
- Duplicate output streams (e.g. to a log file)
Copy link
Contributor

@komal-dhull komal-dhull left a comment

Choose a reason for hiding this comment

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

lgtm

* only by humans.
*/
export function print1(message: any) {
// eslint-disable-next-line no-console
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: can we use more descriptive names than print1 and print2?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think these are pretty common in the Unix world, as 1 and 2 refer to the respective file descriptors (/fd/1 is stdout, /fd/2 is stderr).

@nbrahms nbrahms merged commit a529f98 into main Feb 20, 2024
2 checks passed
@nbrahms nbrahms deleted the nathan/print branch April 2, 2024 16:36
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