File tree Expand file tree Collapse file tree 3 files changed +17
-1
lines changed Expand file tree Collapse file tree 3 files changed +17
-1
lines changed Original file line number Diff line number Diff line change 1+ import test from '../..'
2+
3+ test . cb ( t => {
4+ t . end ( )
5+ } )
Original file line number Diff line number Diff line change @@ -119,6 +119,13 @@ interface RegisterBase<T> {
119119 ( run : Macros < GenericTestContext < T > > , ...args : any [ ] ) : void ;
120120}
121121
122+ interface CallbackRegisterBase < T > {
123+ ( name : string , run : GenericCallbackTest < T > ) : void ;
124+ ( run : GenericCallbackTest < T > ) : void ;
125+ ( name : string , run : Macros < GenericCallbackTestContext < T > > , ...args : any [ ] ) : void ;
126+ ( run : Macros < GenericCallbackTestContext < T > > , ...args : any [ ] ) : void ;
127+ }
128+
122129export default test ;
123130export const test : RegisterContextual < any > ;
124131export interface RegisterContextual < T > extends Register < Context < T > > {
Original file line number Diff line number Diff line change @@ -74,7 +74,11 @@ function generatePrefixed(prefix) {
7474 // 'todo' functions don't have a function argument, just a string
7575 output += `\t${ part } : (name: string) => void;\n` ;
7676 } else {
77- output += `\t${ part } : RegisterBase<T>` ;
77+ if ( arrayHas ( parts ) ( 'cb' ) ) {
78+ output += `\t${ part } : CallbackRegisterBase<T>` ;
79+ } else {
80+ output += `\t${ part } : RegisterBase<T>` ;
81+ }
7882
7983 if ( hasChildren ( parts ) ) {
8084 // This chain can be continued, make the property an intersection type with the chain continuation
You can’t perform that action at this time.
0 commit comments