This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
NetBeans presently provides really good support for the @param tag on function arguments. It would be great to be able to recognise @typedef types where they are able to be used in JSDoc, such as method arguments and variable declarations. Consider the following: /** * @typedef MakeSelectWidgetArgs * @type {object} * @property {String} keyField * Key field for property * @property {String} [label] * Label to add to select widget * @property {(String|function|Array.<String>)} dataSource * Source for option elements, may be: ... */ /** * Make a select widget. * * @param {MakeSelectWidgetArgs} opts * Object containing properties to create widget for. */ function makeSelectWidget(opts){ } Two very beneficial enhancements could be added. 1. Provide links within documentation of makeSelectWidget code completion to link to the `MakeSelectWidgetArgs' type. 2. Code documentation after the left brace of `makeSelectWidget({}' should show documentation to the types documentation. 3. Any annotation of a variable declaration shall provide code completion to the properties defined within the @typedef type. It would be acceptable to require types to have explicit @type annotation's, such as: /** @type {MakeSelectWidgetArgs} */ var args = {}; /* Or inline. */ makeSelectWidget(/** @type {MakeSelectWidgetArgs} */ { });
Some of these I have implemented in the web-main. Some part of the functionality is missing. Keep open.
Thats so cool Petr, thank you.