Skip to content

Commit 0ccb3fb

Browse files
authored
Merge pull request #13 from mirao/master
Create TypeScript definition
2 parents 03f3691 + a729a64 commit 0ccb3fb

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

index.d.ts

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
export = CmdHelper;
2+
/**
3+
* Command helper
4+
*
5+
* @author Thiago Delgado Pinto
6+
*/
7+
declare class CmdHelper {
8+
/**
9+
* Constructor
10+
*
11+
* @param {object} config Configuration declared in the CodeceptJS configuration file.
12+
*/
13+
constructor(config: object);
14+
options: any;
15+
/**
16+
* Executes the given command.
17+
*
18+
* @param {string} command Command to execute.
19+
* @param {object} [options] Same options as in NodeJS' spawn(), plus `showOutput: boolean`. Optional. Default is `{ shell: true, showOutput: true }`.
20+
*
21+
* @returns Promise with the returning execution status code (0 means success)
22+
*/
23+
runCommand(command: string, options?: object): any;
24+
}

index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class CmdHelper extends Helper {
4141
* Executes the given command.
4242
*
4343
* @param {string} command Command to execute.
44-
* @param {object} options Same options as in NodeJS' spawn(), plus `showOutput: boolean`. Optional. Default is `{ shell: true, showOutput: true }`.
44+
* @param {object} [options] Same options as in NodeJS' spawn(), plus `showOutput: boolean`. Optional. Default is `{ shell: true, showOutput: true }`.
4545
*
4646
* @returns Promise with the returning execution status code (0 means success)
4747
*/

0 commit comments

Comments
 (0)