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

Unify Documentation for Assertions #157

Merged
merged 1 commit into from Sep 12, 2022

Conversation

tommy-mitchell
Copy link
Contributor

In #130 (comment), it's pointed out that the descriptions of each assertion is different between the readme and the assert.ts file. For example, expectDeprecated() is defined as:

https://github.com/SamVerschueren/tsd/blob/14f28125e74ca533645d264209e7f9fd0e778568/source/lib/assertions/assert.ts#L55-L63

Whereas the readme says:

expectDeprecated(value)

Check that value is marked a @deprecated.


This PR changes each assertion description to consistently use expression and to say:

Asserts that (the type of) expression . . .

In addition, the documentation comment of each assertion handler follows the same form:

/**
 * Asserts that the argument of the assertion ...
 *
 * @param checker - The TypeScript type checker.
 * @param nodes - The `expectASSERTION` AST nodes.
 * @return List of custom diagnostics.
 */

tommy-mitchell added a commit to tommy-mitchell/tsd that referenced this pull request Sep 12, 2022
@sindresorhus sindresorhus merged commit d32f3a7 into tsdjs:main Sep 12, 2022
@sindresorhus
Copy link
Collaborator

Thanks for doing this :)

tommy-mitchell added a commit to tommy-mitchell/tsd that referenced this pull request Sep 13, 2022
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.

None yet

2 participants