mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-06-02 06:29:40 +08:00
Add missing RegExp definition and fix route
Add the missing RegExp definition for the url params of the route function. Also allow to call the route with the options params.
This commit is contained in:
6
types/cypress/index.d.ts
vendored
6
types/cypress/index.d.ts
vendored
@@ -318,9 +318,9 @@ declare namespace Cypress {
|
||||
/**
|
||||
* @see https://on.cypress.io/api/route
|
||||
*/
|
||||
route(url: string, response?: any): Chainable;
|
||||
route(method: string, url: string, response?: any): Chainable;
|
||||
route(fn: () => RouteOptions | RouteOptions): Chainable;
|
||||
route(url: string | RegExp, response?: any): Chainable;
|
||||
route(method: string, url: string | RegExp, response?: any): Chainable;
|
||||
route(fn: (() => RouteOptions) | RouteOptions): Chainable;
|
||||
|
||||
/**
|
||||
* @see https://on.cypress.io/api/screenshot
|
||||
|
||||
Reference in New Issue
Block a user