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

Explain how (and why) JSDoc merges adjacent comments #40

Open
hegemonic opened this issue Aug 6, 2013 · 0 comments
Open

Explain how (and why) JSDoc merges adjacent comments #40

hegemonic opened this issue Aug 6, 2013 · 0 comments

Comments

@hegemonic
Copy link
Contributor

We should update the Getting Started page to explain how, and why, we merge adjacent comment blocks. In brief, it's to help users document overloaded methods.

Here's the intended use case:

/**
 * Get the foo.
 *//**
 * Set the foo.
 * @param {string} newFoo - The new foo.
 */
function foo(newFoo) {
    if (newFoo === undefined) {
        return foo;
    }

    foo = newFoo;
}

The docs may cover overloaded methods elsewhere (I haven't checked), but since the Getting Started page talks about JSDoc comment syntax, we should mention this behavior there.

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

No branches or pull requests

1 participant