File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ interface TestOptions {
3535 signal ?: AbortSignal ;
3636}
3737
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 > ;
3939
4040export default test ;
4141
@@ -47,13 +47,13 @@ export default test;
4747 * Default: A no-op function.
4848 * @returns A {@link Promise} resolved with `undefined` once the test completes.
4949 */
50- export function test (
50+ export function test < T > (
5151 name : string ,
5252 options : TestOptions ,
53- fn : TestFn
53+ fn : TestFn < T >
5454) : 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 > ;
5757export function test ( fn : TestFn ) : Promise < void > ;
5858
5959type SuiteFn = ( t : SuiteContext ) => void ;
You can’t perform that action at this time.
0 commit comments