@@ -83,7 +83,7 @@ namespace CypressCommandsTests {
83
83
arg // $ExpectType string
84
84
} )
85
85
Cypress . Commands . add ( 'newCommand' , { prevSubject : true } , ( subject , arg ) => {
86
- subject // $ExpectType unknown
86
+ subject // $ExpectType any
87
87
arg // $ExpectType string
88
88
return
89
89
} )
@@ -113,11 +113,11 @@ namespace CypressCommandsTests {
113
113
arg // $ExpectType string
114
114
} )
115
115
Cypress . Commands . add ( 'newCommand' , { prevSubject : 'element' } , ( subject , arg ) => {
116
- subject // $ExpectType JQuery <HTMLElement>
116
+ subject // $ExpectType JQueryWithSelector <HTMLElement>
117
117
arg // $ExpectType string
118
118
} )
119
119
Cypress . Commands . add ( 'newCommand' , { prevSubject : [ 'element' ] } , ( subject , arg ) => {
120
- subject // $ExpectType JQuery <HTMLElement>
120
+ subject // $ExpectType JQueryWithSelector <HTMLElement>
121
121
arg // $ExpectType string
122
122
} )
123
123
Cypress . Commands . add ( 'newCommand' , { prevSubject : [ 'element' , 'document' , 'window' ] } , ( subject , arg ) => {
@@ -126,7 +126,7 @@ namespace CypressCommandsTests {
126
126
} else if ( subject instanceof Document ) {
127
127
subject // $ExpectType Document
128
128
} else {
129
- subject // $ExpectType JQuery <HTMLElement>
129
+ subject // $ExpectType JQueryWithSelector <HTMLElement>
130
130
}
131
131
arg // $ExpectType string
132
132
} )
@@ -136,7 +136,7 @@ namespace CypressCommandsTests {
136
136
} else if ( subject instanceof Document ) {
137
137
subject // $ExpectType Document
138
138
} else if ( subject ) {
139
- subject // $ExpectType JQuery <HTMLElement>
139
+ subject // $ExpectType JQueryWithSelector <HTMLElement>
140
140
} else {
141
141
subject // $ExpectType void
142
142
}
@@ -173,7 +173,7 @@ namespace CypressCommandsTests {
173
173
} )
174
174
Cypress . Commands . addAll ( { prevSubject : true } , {
175
175
newCommand : ( subject , arg ) => {
176
- subject // $ExpectType unknown
176
+ subject // $ExpectType any
177
177
arg // $ExpectType any
178
178
return
179
179
} ,
@@ -215,13 +215,13 @@ namespace CypressCommandsTests {
215
215
} )
216
216
Cypress . Commands . addAll ( { prevSubject : 'element' } , {
217
217
newCommand : ( subject , arg ) => {
218
- subject // $ExpectType JQuery <HTMLElement>
218
+ subject // $ExpectType JQueryWithSelector <HTMLElement>
219
219
arg // $ExpectType any
220
220
}
221
221
} )
222
222
Cypress . Commands . addAll ( { prevSubject : [ 'element' ] } , {
223
223
newCommand : ( subject , arg ) => {
224
- subject // $ExpectType JQuery <HTMLElement>
224
+ subject // $ExpectType JQueryWithSelector <HTMLElement>
225
225
arg // $ExpectType any
226
226
}
227
227
} )
@@ -232,7 +232,7 @@ namespace CypressCommandsTests {
232
232
} else if ( subject instanceof Document ) {
233
233
subject // $ExpectType Document
234
234
} else {
235
- subject // $ExpectType JQuery <HTMLElement>
235
+ subject // $ExpectType JQueryWithSelector <HTMLElement>
236
236
}
237
237
arg // $ExpectType any
238
238
}
@@ -244,7 +244,7 @@ namespace CypressCommandsTests {
244
244
} else if ( subject instanceof Document ) {
245
245
subject // $ExpectType Document
246
246
} else if ( subject ) {
247
- subject // $ExpectType JQuery <HTMLElement>
247
+ subject // $ExpectType JQueryWithSelector <HTMLElement>
248
248
} else {
249
249
subject // $ExpectType void
250
250
}
@@ -271,7 +271,7 @@ namespace CypressCommandsTests {
271
271
originalFn . apply ( this , [ arg ] ) // $ExpectType Chainable<number>
272
272
} )
273
273
Cypress . Commands . overwrite < 'type' , 'element' > ( 'type' , ( originalFn , element , text , options ?: Partial < Cypress . TypeOptions & { sensitive : boolean } > ) => {
274
- element // $ExpectType JQuery <HTMLElement>
274
+ element // $ExpectType JQueryWithSelector <HTMLElement>
275
275
text // $ExpectType string
276
276
277
277
if ( options && options . sensitive ) {
0 commit comments