Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

115
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda