mirror of
https://github.com/cypress-io/cypress.git
synced 2026-04-23 23:49:43 -05:00
fix: Cypress.Commands.add Type Signature for @typescript-eslint/no-misused-promises rule (#7547)
This commit is contained in:
Vendored
+5
-3
@@ -355,9 +355,9 @@ declare namespace Cypress {
|
||||
* @see https://on.cypress.io/api/commands
|
||||
*/
|
||||
Commands: {
|
||||
add(name: string, fn: (...args: any[]) => void): void
|
||||
add(name: string, options: CommandOptions, fn: (...args: any[]) => void): void
|
||||
overwrite(name: string, fn: (...args: any[]) => void): void
|
||||
add(name: string, fn: (...args: any[]) => CanReturnChainable): void
|
||||
add(name: string, options: CommandOptions, fn: (...args: any[]) => CanReturnChainable): void
|
||||
overwrite(name: string, fn: (...args: any[]) => CanReturnChainable): void
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -491,6 +491,8 @@ declare namespace Cypress {
|
||||
off: Actions
|
||||
}
|
||||
|
||||
type CanReturnChainable = void | Chainable
|
||||
|
||||
/**
|
||||
* Chainable interface for non-array Subjects
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user