Skip to content

Function shorthand syntax support? #678

Closed
@bpatram

Description

@bpatram

I'm running the latest version to date (4.0.0-beta.15).

It seems that when writing functions within an object using the shorthand notation that function does not get placed within its parent class when outputting documentation. See example below:

// myfile.js
import { LayoutView } from 'backbone.marionette';

/**
 * A neat layout view
 * @class BaseLayoutView
 * @augments Marionette.LayoutView
 */
export default LayoutView.extend(
	/** @lends BaseLayoutView.prototype */
	{
		/**
		 * My neat function
		 * @param {string} word your word
		 * @returns {string} your word but one better
		 */
		foo: function(word) {
			return word + 1;
		},
		/**
		 * My neat function
		 * @param {string} word your word
		 * @returns {string} your word but one better
		 */
		bar(word) {
			return word + 1;
		}
	}
)

Output after running: documentation build myfile.js -f html -o docs

baddoc

Notice how the bar function is not nested under the BaseLayoutView class. This only occurs when using the function shorthand notation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions