Bug
It throws an error whenever I'm doing
Allow me to set a custom delay when typing. Preferably at a cypress.json configuration level.
Cypress.Commands.overwrite("type", (originalFn, string) => originalFn(string, { delay: 1 }))
cy.get('foo').type('bar')
cy.get('foo').type('bar')

This isn't a bug. You've overriding a child command which yields you the current subject as the 2nd argument. The cy.type() must know what element it's typing into. You basically provided it a string as the element, and an object as to what to type.
Cypress.Commands.overwrite("type", (originalFn, subject, string, options) => ...
Cypress.Commands.overwrite(
"type",
(originalFn, subject, string, options) => originalFn(
string,
Object.assign({}, options, {delay: 1})
)
)
cy.get('input[name="mainPhoneNo"]').type('07070707070')
now throws

Because you're not actually passing subject to type. Type must be called with the subject as its first argument.
Thank you! This works:
Cypress.Commands.overwrite(
"type",
(originalFn, subject, string, options) => originalFn(
subject,
string,
Object.assign({}, options, { delay: 1 )
)
)
Most helpful comment
Thank you! This works: