declare namespace Cypress { interface Chainable < Subject > { login ( email , password ) : void ; } } Cypress . Commands . add ( 'login' , ( email , password ) => { console . log ( 'Custom command example: Login' , email , password ) ; } ) ;