File tree 1 file changed +5
-5
lines changed 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ interface TestOptions {
35
35
signal ?: AbortSignal ;
36
36
}
37
37
38
- type TestFn = ( t : TestContext , done : ( result ?: any ) => void ) => any ;
38
+ type TestFn = < T > ( t : TestContext , done : ( result ?: T ) => void ) => any | < T > ( t : TestContext ) => Promise < T > ;
39
39
40
40
export default test ;
41
41
@@ -47,13 +47,13 @@ export default test;
47
47
* Default: A no-op function.
48
48
* @returns A {@link Promise} resolved with `undefined` once the test completes.
49
49
*/
50
- export function test (
50
+ export function test < T > (
51
51
name : string ,
52
52
options : TestOptions ,
53
- fn : TestFn
53
+ fn : TestFn < T >
54
54
) : Promise < void > ;
55
- export function test ( name : string , fn : TestFn ) : Promise < void > ;
56
- export function test ( options : TestOptions , fn : TestFn ) : Promise < void > ;
55
+ export function test < T > ( name : string , fn : TestFn < T > ) : Promise < void > ;
56
+ export function test < T > ( options : TestOptions , fn : TestFn < T > ) : Promise < void > ;
57
57
export function test ( fn : TestFn ) : Promise < void > ;
58
58
59
59
type SuiteFn = ( t : SuiteContext ) => void ;
You can’t perform that action at this time.
0 commit comments