@@ -150,7 +150,7 @@ export interface DeepEqualAssertion {
150
150
* Assert that `actual` is [deeply equal](https://github.com/concordancejs/concordance#comparison-details) to
151
151
* `expected`, returning a boolean indicating whether the assertion passed.
152
152
*/
153
- < ValueType = any > ( actual : ValueType , expected : ValueType , message ?: string ) : boolean ;
153
+ < Actual , Expected extends Actual > ( actual : Actual , expected : Expected , message ?: string ) : actual is Expected ;
154
154
155
155
/** Skip this assertion. */
156
156
skip ( actual : any , expected : any , message ?: string ) : void ;
@@ -160,7 +160,7 @@ export interface LikeAssertion {
160
160
/**
161
161
* Assert that `value` is like `selector`, returning a boolean indicating whether the assertion passed.
162
162
*/
163
- ( value : any , selector : Record < string , any > , message ?: string ) : boolean ;
163
+ < Expected extends Record < string , any > > ( value : any , selector : Expected , message ?: string ) : value is Expected ;
164
164
165
165
/** Skip this assertion. */
166
166
skip ( value : any , selector : any , message ?: string ) : void ;
@@ -178,7 +178,7 @@ export interface FalseAssertion {
178
178
/**
179
179
* Assert that `actual` is strictly false, returning a boolean indicating whether the assertion passed.
180
180
*/
181
- ( actual : any , message ?: string ) : boolean ;
181
+ ( actual : any , message ?: string ) : actual is false ;
182
182
183
183
/** Skip this assertion. */
184
184
skip ( actual : any , message ?: string ) : void ;
@@ -201,7 +201,7 @@ export interface IsAssertion {
201
201
* value](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is) as `expected`,
202
202
* returning a boolean indicating whether the assertion passed.
203
203
*/
204
- < ValueType = any > ( actual : ValueType , expected : ValueType , message ?: string ) : boolean ;
204
+ < Actual , Expected extends Actual > ( actual : Actual , expected : Expected , message ?: string ) : actual is Expected ;
205
205
206
206
/** Skip this assertion. */
207
207
skip ( actual : any , expected : any , message ?: string ) : void ;
@@ -213,7 +213,7 @@ export interface NotAssertion {
213
213
* value](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is) as `expected`,
214
214
* returning a boolean indicating whether the assertion passed.
215
215
*/
216
- < ValueType = any > ( actual : ValueType , expected : ValueType , message ?: string ) : boolean ;
216
+ < Actual , Expected > ( actual : Actual , expected : Expected , message ?: string ) : boolean ;
217
217
218
218
/** Skip this assertion. */
219
219
skip ( actual : any , expected : any , message ?: string ) : void ;
@@ -224,7 +224,7 @@ export interface NotDeepEqualAssertion {
224
224
* Assert that `actual` is not [deeply equal](https://github.com/concordancejs/concordance#comparison-details) to
225
225
* `expected`, returning a boolean indicating whether the assertion passed.
226
226
*/
227
- < ValueType = any > ( actual : ValueType , expected : ValueType , message ?: string ) : boolean ;
227
+ < Actual , Expected > ( actual : Actual , expected : Expected , message ?: string ) : boolean ;
228
228
229
229
/** Skip this assertion. */
230
230
skip ( actual : any , expected : any , message ?: string ) : void ;
@@ -334,7 +334,7 @@ export interface TrueAssertion {
334
334
/**
335
335
* Assert that `actual` is strictly true, returning a boolean indicating whether the assertion passed.
336
336
*/
337
- ( actual : any , message ?: string ) : boolean ;
337
+ ( actual : any , message ?: string ) : actual is true ;
338
338
339
339
/** Skip this assertion. */
340
340
skip ( actual : any , message ?: string ) : void ;
0 commit comments