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

Add inline documentation #11

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

Conversation

o-alexandre-felipe
Copy link

I use InteliJ webstorm (free propaganda here), and it is convenient when the code has inline documentation.

First I noticed that the return type was not defined in the module declarations.

Looking into the implementation I concluded that it must return a number .

I also changed the return type of the comparison function (that by the way I extracted in a separate interface). The previous declaration accepts null or undefined as return types. I think that this would lead to some confusion, e.g. bounds.lt(array, y) + 1 != bounds.ge(array, y), in an array where y appears multiple times.

The screenshot shows how the inline documentation appears in the IDE

image

hosseinmd added a commit to hosseinmd/binary-search-bounds that referenced this pull request Mar 25, 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.

1 participant