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(...)