'How to document a class as member of namespace

// in some file
/**
 * @typedef myspace
 * @property {Object} models
 * @property {Object} services
*/

// in other files

/** @typedef myspace.models.ModelA */
class ModelA { ... }

/** @typedef myspace.models.ModelB */
class ModelB { ... }

/** @typedef myspace.services.ServiceA */
class ServiceA { ... }

How to define classes with JSDoc if I want to make them as members of the namespaces myspace.models and myspace.services?



Solution 1:[1]

You need using @namespace and @memberOf, I believe

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 lena