@@ -35,15 +35,35 @@ interface RunBin {
35
35
*/
36
36
( ) : execa . ExecaChildProcess < string > ;
37
37
/**
38
- * A runBin implementation that takes varargs.
38
+ * A runBin implementation that takes string varargs.
39
39
*
40
40
* @param {...RunBinArgs } args
41
41
* @returns {* } {execa.ExecaChildProcess<string>}
42
42
* @memberof RunBin
43
43
*/
44
- ( ...args : RunBinArgs ) : execa . ExecaChildProcess < string > ;
44
+ ( ...args : [ ...binArgs : string [ ] ] ) : execa . ExecaChildProcess < string > ;
45
+ /**
46
+ * A runBin implementation that takes an execa.Options<string> object.
47
+ *
48
+ * @param {...RunBinArgs } args
49
+ * @returns {* } {execa.ExecaChildProcess<string>}
50
+ * @memberof RunBin
51
+ */
52
+ ( ...args : [ execaOptions : execa . Options < string > ] ) : execa . ExecaChildProcess < string > ;
53
+ /**
54
+ * A runBin implementation that takes string or an execa.Options<string> object varargs.
55
+ *
56
+ * @param {...RunBinArgs } args
57
+ * @returns {* } {execa.ExecaChildProcess<string>}
58
+ * @memberof RunBin
59
+ */
60
+ (
61
+ ...args : [ ...binArgs : string [ ] , execaOptions : execa . Options < string > ]
62
+ ) : execa . ExecaChildProcess < string > ;
45
63
}
46
64
65
+ type RunBinArgs = ( string | execa . Options < string > ) [ ] ;
66
+
47
67
interface CreateBinTesterResult < TProject extends BinTesterProject > {
48
68
/**
49
69
* Runs the configured bin function via execa.
@@ -63,8 +83,6 @@ interface CreateBinTesterResult<TProject extends BinTesterProject> {
63
83
teardownProject : ( ) => void ;
64
84
}
65
85
66
- type RunBinArgs = [ ...binArgs : string [ ] , execaOptions : execa . Options < string > ] ;
67
-
68
86
const DEFAULT_BIN_TESTER_OPTIONS = {
69
87
staticArgs : [ ] ,
70
88
} ;
0 commit comments