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

Assertion parameter names are inconsistent between documentation and declaration ("value" vs. "actual") #2938

Closed
DavidAnson opened this issue Jan 9, 2022 · 2 comments · Fixed by #2950

Comments

@DavidAnson
Copy link

Documentation for the is assertion uses parameter names value and expected:

### `.is(value, expected, message?)`

Declaration for the same assertion uses parameter names actual and expected:

<Actual, Expected extends Actual>(actual: Actual, expected: Expected, message?: string): actual is Expected;

This is inconsistent. I think actual/expected is more clear and more common, so suggest standardizing on that pairing.

@novemberborn
Copy link
Member

Sounds good to me. Would you like to open a PR @DavidAnson?

@DavidAnson
Copy link
Author

Please don't wait for me to send a PR, it's unlikely I'll have time for this soon.

live627 added a commit to live627/ava that referenced this issue Jan 22, 2022
live627 added a commit to live627/ava that referenced this issue Jan 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants