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

writable jsdoc @param not optional #2867

Closed
btakita opened this issue May 26, 2019 · 0 comments · Fixed by #2868
Closed

writable jsdoc @param not optional #2867

btakita opened this issue May 26, 2019 · 0 comments · Fixed by #2868

Comments

@btakita
Copy link
Contributor

btakita commented May 26, 2019

In Webstorm, there is a warning Invalid number of arguments, expected 1..2 for the following.

const store = writable()

The jsdoc definition for writable,

/**
 * Create a `Writable` store that allows both updating and reading by subscription.
 * @param value initial value
 * @param start start and stop notifications for subscriptions
 */

should be

/**
 * Create a `Writable` store that allows both updating and reading by subscription.
 * @param [value] initial value
 * @param [start] start and stop notifications for subscriptions
 */

to indicate that value & start are optional arguments.

@btakita btakita changed the title store jsdoc @param not optional for writable writable jsdoc @param not optional May 26, 2019
btakita added a commit to btakita/svelte that referenced this issue May 26, 2019
btakita added a commit to btakita/svelte that referenced this issue May 26, 2019
Rich-Harris added a commit that referenced this issue May 27, 2019
Additional detail to jsdocs for writable, readable, & derived
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 a pull request may close this issue.

1 participant