diff --git a/cli/types/cypress.d.ts b/cli/types/cypress.d.ts index 678ce5e9651b..fbbb5706d554 100644 --- a/cli/types/cypress.d.ts +++ b/cli/types/cypress.d.ts @@ -1942,7 +1942,7 @@ declare namespace Cypress { * @example * cy.wait(1000) // wait for 1 second */ - wait(ms: number, options?: Partial): Chainable + wait(ms: number, options?: Partial): Chainable /** * Wait for a specific XHR to respond. * diff --git a/cli/types/tests/cypress-tests.ts b/cli/types/tests/cypress-tests.ts index f8a6befe82c2..78155311b935 100644 --- a/cli/types/tests/cypress-tests.ts +++ b/cli/types/tests/cypress-tests.ts @@ -215,6 +215,10 @@ cy.wait(['@foo', '@bar']) first // $ExpectType WaitXHR }) +cy.wait(1234) // $ExpectType Chainable + +cy.wrap('foo').wait(1234) // $ExpectType Chainable + cy.wrap([{ foo: 'bar' }, { foo: 'baz' }]) .then(subject => { subject // $ExpectType { foo: string; }[]