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: describe parameter types & instruct TS usage #74

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

scscgit
Copy link

@scscgit scscgit commented Apr 8, 2022

When I was reading current README in a hurry, I felt like the current instructions are ambiguous, e.g. as if the '42' parameter is some length and 'hex' is a value to be converted. The list of supported algorithms also has to be deduced with some assumptions. My suggestion is to solve all these issues together by explicitly documenting the type of this library interface for any newcomers, possibly along with a reminder that the @types/sha.js library is also available (it feels like the "on pure JavaScript" description implies otherwise).

The algorithm parameter is however typed as string right now; I've prepared a PR to address this in DefinitelyTyped/DefinitelyTyped#59757

@scscgit scscgit marked this pull request as ready for review April 25, 2022 22:02
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

1 participant