[wp-trac] [WordPress Trac] #41682: JSDoc correction for namespaces
WordPress Trac
noreply at wordpress.org
Mon Aug 21 10:25:03 UTC 2017
#41682: JSDoc correction for namespaces
------------------------------+-----------------------------
Reporter: herregroen | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Keywords:
Focuses: javascript, docs |
------------------------------+-----------------------------
Currently the generated JSDoc will look as follows:
[https://atimmer.github.io/wordpress-jsdoc/].
This has the following issues:
* Everything is in the global namespace.
* Many functions are incorrectly seen as global functions due to JSDoc not
recognising `extend`.
* The default JSDoc template will duplicate any namespaces that are
defined multiple times.
To fix this the following should happen:
* Define all used namespaces using `@namespace`.
* Correctly specify in which namespace each class is using `@memberOf`.
* Define each usage of the `extend` function as a prototype assignment
using `@lends`.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/41682>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list