I have an object out of which I create an alias named userId
cy.wrap(response.id).as('userId');
When referencing userId its type is JQuery<HTMLElement>
cy.get('@userId').then(userId => // userId type is JQuery<HTMLElement> });
How does one define the alias type when defining the alias?
Intention is to have it as a number directly instead of default JQuery<HTMLElement>
EDIT
I do not want something like this
cy.get<number>('@userId').then(userId => // userId type is number });
I want to define the type at function definition.