Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

251
Vistas
JSDoc: Auto detecting class methods

My jsdocs look like the following

module.exports = class gateio extends Exchange {
    /**
     * @class
     * @name gateio
     */

    async fetchOrder (id, symbol = undefined, params = {}) {
        /**
         * @method
         * @name gateio#fetchOrder
         * @description Retrieves information on an order
         * @param {string} id : Order id
         * @param {string} symbol : Unified market symbol
         * @param {boolean} params.stop : True if the order being fetched is a trigger order
         * @param {dictionary} params : Parameters specified by the exchange api
         * @returns [Order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
         */

Is there any way to auto detect that

  • that fetchOrder is a method
  • its name is fetchOrder and it belongs to class gateio
  • its description is "Retrieves information on an order"
  • That gateio is a class
  • that gateio's name is gateio

Or do I have to specify @method, @name, @class, @description for every doc?

These @'s seem superfluous and I would like to exclude them if I could

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

It seems like jsdoc is confused by module.exports = class ... . I was able to get it to work like this:

/**
 * (description text)
 */
class gateio extends Exchange {
    /**
     * Retrieves information on an order
     * @param {string} id : Order id
     * @param {string} symbol : Unified market symbol
     * @param {boolean} params.stop : True if the order being fetched is a trigger order
     * @param {dictionary} params : Parameters specified by the exchange api
     * @returns [Order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
     */
    async fetchOrder (id, symbol = undefined, params = {}) {
        // ...
    }
}
module.exports = gateio
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda