File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -95,6 +95,10 @@ Then you can add the `dataCy` command to the global Cypress Chainable interface
95
95
// load type definitions that come with Cypress module
96
96
/// <reference types = " cypress" />
97
97
98
+ // Add one export statement so that TypeScript sees this file as a module rather than script.
99
+ // This is necessary otherwise TypeScript will complain about `declare global`.
100
+ export {}
101
+
98
102
declare global {
99
103
namespace Cypress {
100
104
interface Chainable {
@@ -164,6 +168,10 @@ type automatically based on the specified `prevSubject`.
164
168
// load type definitions that come with Cypress module
165
169
/// <reference types = " cypress" />
166
170
171
+ // Add one export statement so that TypeScript sees this file as a module rather than script.
172
+ // This is necessary otherwise TypeScript will complain about `declare global`.
173
+ export {}
174
+
167
175
declare global {
168
176
namespace Cypress {
169
177
interface Chainable {
You can’t perform that action at this time.
0 commit comments