Skip to content
This repository was archived by the owner on Mar 23, 2024. It is now read-only.
This repository was archived by the owner on Mar 23, 2024. It is now read-only.

Multi line jsdoc @param tag #245

@jifeon

Description

@jifeon

I have the following code:

/**
 * @param {string} name
 * @param {
 *      {
 *          status?: boolean|{error?: boolean, success?: boolean},
 *          hint?: boolean|{error?: boolean, success?: boolean}
 *      }
 *      |FormFieldStatusCondition
 * } [condition]
 * @returns {FormFieldStatus} this
 */
setCondition: function (name, condition) {
    if (!(condition instanceof FormFieldStatusCondition)) {
        condition = new FormFieldStatusCondition(condition);
    }

    this._conditions[name] = condition;
    return this;
}

And PhpStorm works with it perfectly. I have not found any mentions about multi line @param tag in jsdoc specification. When I check my code by jscs it says:

Invalid JSDoc @param at js/Abstract/FormFieldStatus.js :
   315 |        /**
   316 |         * @param {string} name
   317 |         * @param {
-------------------^
   318 |         *      {
   319 |         *          status?: boolean|{error?: boolean, success?: boolean},


1 code style error found.

Could add support for multiline @param tag?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions