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

114
Vistas
JSDoc a method call so it points to the function being injected

I have created a cypress function that is injected into the cypress flow using Cypress.Commands.add and I would like to document where it is being used to reference the actual function.

So, I have a function that looks something like this:

/**
 * My docs....
 * @params ...
 * @returns ...
 */
export function tokenize(isE2e = false) {

}

It is added to cypress like this:

Cypress.Commands.add('tokenize', (isE2E) => tokenize(isE2E));

Is there a way that I can document this line to show that it is referring to the function above?

cy.tokenize().then(...)

I have tried this, but it only partially works. It links to the function but doesn't know what the parameters are or what is returned.

/** @type {{tokenize: import('./token').tokenize}} */
cy.tokenize(true).then(...)
about 4 years ago · Juan Pablo Isaza
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