Monday, 15 March 2010

javascript - Is there an official order for JSDoc tags in documentation? -



javascript - Is there an official order for JSDoc tags in documentation? -

i documenting javascript api. next google style guide found nil order of tags.

i document variable this:

/** * @description radius of circle * @private * @memberof circle * @type {number} * @default */ circle.prototype._radius = 1;

as can see, write tags using own order, 1 find intuitive.

here same documentation tags ordered alphabetically:

/** * @default * @description radius of circle * @memberof circle * @private * @type {number} */ circle.prototype._radius = 1;

despite, having defined order (alphabetically), find bit confusing, because messes natural order of comments. why looking way write tags specific official order.

is there official order these tags?

thanks

there's no official order jsdoc tags. tend set more general tags first, followed more specific tags, similar first example.

in general, jsdoc doesn't care tag order, there few notable exceptions:

any text before first tag used description. can provide description @desc (or @description) tag, did in example. when utilize @param tag document function parameters, parameters must utilize same order function signature.

javascript tags order jsdoc google-style-guide

No comments:

Post a Comment