I am using Cypress 10.
I have seen this code:
Cypress.Commands.add(
'byTestId',
// Borrow the signature from cy.get
<E extends Node = HTMLElement>(
id: string,
options?: Partial<
Cypress.Loggable & Cypress.Timeoutable & Cypress.Withinable & Cypress.Shadow
>,
): Cypress.Chainable<JQuery<E>> =
cy.get(`[data-testid="${id}"]`, options),
);
What does the E extends Node = HTMLElement
means exactly? and can it be replaced by E extends HTMLElement
Is there a difference in these two?