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

[docs] clarifying docs #20

Closed
avocade opened this issue Sep 11, 2024 · 2 comments
Closed

[docs] clarifying docs #20

avocade opened this issue Sep 11, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@avocade
Copy link

avocade commented Sep 11, 2024

But spy! also emphasizes form and id, like trace!. A bit confusing.

- Identical to `spy!`, but emphasizes form + id rather than form + level.

@avocade avocade changed the title [docs] event instead of spy [docs] clarifying docs Sep 11, 2024
@ptaoussanis
Copy link
Member

ptaoussanis commented Sep 11, 2024

@avocade Hi Oskar-

But spy! also emphasizes form and id, like trace!

Where are you seeing that? Might have a typo somewhere!

The correct info is in the README / Getting started or docstrings, e.g.:

From the trace! docstring:

"Trace" signal creator, emphasizing form + id.
API: [form] [id-or-opts form] => form's result (value/throw) (unconditional)
Identical to spy!, but emphasizes form + id rather than form + level.

And from the spy! docstring:

"Spy" signal creator, emphasizing form + level.
API: [form] [level-or-opts form] => form's result (value/throw) (unconditional)
Identical to trace!, but emphasizes form + level rather than form + id.

So trace! is form + id, and spy! is form + level.

@ptaoussanis
Copy link
Member

Found the likely source of the confusion!

The arglist metadata on spy! was wrong, so could be you were looking at your IDE's arg hints. Will get this fixed on the next release, thanks for the report 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants