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 JSDoc annotations to the public API #300

Merged
merged 1 commit into from
Jul 22, 2015
Merged

Conversation

gaearon
Copy link
Contributor

@gaearon gaearon commented Jul 22, 2015

This adds JSDoc annotations to the public API as discussed in #140 and #89.
Comments are welcome!

(This is written against the 1.0 API which is not officially released yet.)

@gaearon gaearon added the docs label Jul 22, 2015
@gaearon gaearon added this to the 1.0 milestone Jul 22, 2015
* of the Redux store. This is handy for a variety of tasks, such as expressing
* asynchronous actions in a concise manner, or logging every action payload.
*
* See `redux-thunk` package as an example of the Redux middleware.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. For now I'd avoid hardcoding URL because we might move that package to a separate Github organization soon.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's probably wise

@gaearon
Copy link
Contributor Author

gaearon commented Jul 22, 2015

I'll get this in, but comments are still very much appreciated.

The hardest part to understand is probably applyMiddleware but some terminology docs from #140 will help there. Other than that, please let me know if we can rephrase some parts of it for clarity!

gaearon added a commit that referenced this pull request Jul 22, 2015
Add JSDoc annotations to the public API
@gaearon gaearon merged commit 7418203 into breaking-changes-1.0 Jul 22, 2015
@gaearon gaearon deleted the jsdoc branch July 22, 2015 18:37
* and some part of the state tree may potentially have changed. You may then
* call `getState()` to read the current state tree inside the callback.
*
* @param {Function} listener A callback to be invoked on every dispatch.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A good way to document callbacks is to use the @callback tag. This way you can document the @params of the callback function.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I didn't know this! Want to send a PR?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure! I don't really have time tonight though. Guess I can do it after the merge?

Edit: Oh, its merged already ;)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah feel free to make a PR against breaking-changes-1.0 branch.

@gaearon gaearon mentioned this pull request Jul 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants