Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

116
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!