diff --git a/cli/types/index.d.ts b/cli/types/index.d.ts index abe6855a4dca..47d813e3329b 100644 --- a/cli/types/index.d.ts +++ b/cli/types/index.d.ts @@ -4,7 +4,7 @@ // Mike Woudenberg // Robbert van Markus // Nicholas Boll -// TypeScript Version: 3.0 +// TypeScript Version: 3.4 // Updated by the Cypress team: https://www.cypress.io/about/ /// @@ -2026,7 +2026,7 @@ declare namespace Cypress { }) ``` */ - window(options?: Partial): Chainable + window(options?: Partial): Chainable /** * Scopes all subsequent cy commands to within this element. diff --git a/cli/types/tests/kitchen-sink.ts b/cli/types/tests/kitchen-sink.ts index 191d1853ce9b..79915eee228e 100644 --- a/cli/types/tests/kitchen-sink.ts +++ b/cli/types/tests/kitchen-sink.ts @@ -117,6 +117,12 @@ const obj = { } cy.spy(obj, 'foo').as('my-spy') +cy.window().then(window => { + window // $ExpectType Window & typeof globalThis + + window.eval('1') +}) + // use path-based access for nested structures cy.wrap({ foo: {