Skip to content

Commit 91bca43

Browse files
committed
type run
1 parent b471907 commit 91bca43

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -310,12 +310,12 @@ export class PythonShell extends EventEmitter {
310310
}
311311

312312
/**
313-
* Runs a Python script and returns collected messages as a promise
313+
* Runs a Python script and returns collected messages as a promise.
314+
* If the promise is rejected, the err will probably be of type PythonShellErrorWithLogs
314315
* @param scriptPath The path to the script to execute
315316
* @param options The execution options
316-
* @return a promise with the output from the python script
317317
*/
318-
static run(scriptPath: string, options?: Options) {
318+
static run(scriptPath: string, options?: Options): Promise<any[]> {
319319
return new Promise((resolve, reject) => {
320320
let pyshell = new PythonShell(scriptPath, options);
321321
let output = [];

0 commit comments

Comments
 (0)