Skip to content

Commit 91e668e

Browse files
committed
deprecate terminate in favor of kill
better to match name of childprocess method for consistency
1 parent 0936099 commit 91e668e

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

index.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,9 +420,17 @@ export class PythonShell extends EventEmitter{
420420
* Sends a kill signal to the process
421421
* @returns {PythonShell} The same instance for chaining calls
422422
*/
423-
terminate(signal?:string) {
423+
kill(signal?: string) {
424424
this.childProcess.kill(signal);
425425
this.terminated = true;
426426
return this;
427427
};
428+
429+
/**
430+
* Alias for kill.
431+
* @deprecated
432+
*/
433+
terminate(signal?: string) {
434+
return this.kill(signal)
435+
}
428436
};

0 commit comments

Comments
 (0)