/**
* @typedef {Object} UsersState
*
* @property {String} id the DOM id of the component that generated the state
* @property {Object} state the page's state
*/
/**
* @return {UsersState} the page's state
*/
Users.prototype.getState = function()
{
return {
id: "main",
state:
{
table: this.table.getState(),
addUserModal: this.addUserModal.getState(),
editUserModal: this.editUserModal.getState()
}
};
};
The function returns the correct type (following duck typing) yet jscs-jsdoc fails with:
Wrong returns value at ../../../target/classes/js/html/Users.js :
322 | Users.prototype.getState = function()
323 | {
324 | return {
------------------^
325 | id: "main",
326 | state:
Given:
The function returns the correct type (following duck typing) yet jscs-jsdoc fails with:
I believe my syntax is correct because http://justjson.blogspot.ca/2013/07/jsdoc-documenting-configparamcustom.html does the same for the
@returns {JustJson.Greeting.Config}example.