-
Notifications
You must be signed in to change notification settings - Fork 19
/
promise.d.ts
52 lines (47 loc) · 2.14 KB
/
promise.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/// <reference path="index.d.ts"/>
declare module 'terminate/promise' {
import type { TerminateOptions } from 'terminate'
/**
* `terminate` is an ultra-simple way to kill all the node processes
* by providing a process pid. It finds all child processes and shuts
* them down too, so you don't have to worry about lingering processes.
*
* @param pid - the Process ID you want to terminate.
* @throws {Error} - if something went wrong.
*/
export default function terminate(pid: number): Promise<void>;
/**
* `terminate` is an ultra-simple way to kill all the node processes
* by providing a process pid. It finds all child processes and shuts
* them down too, so you don't have to worry about lingering processes.
*
* @param pid - the Process ID you want to terminate.
* @param signal - the signal to kill the processes with. Defaults to `"SIGKILL"`
* if it's empty or not defined.
* @param opts - options object.
* @throws {Error} - if something went wrong.
*/
export default function terminate(pid: number, signal?: string, opts?: TerminateOptions): Promise<void>;
/**
* `terminate` is an ultra-simple way to kill all the node processes
* by providing a process pid. It finds all child processes and shuts
* them down too, so you don't have to worry about lingering processes.
*
* @param pid - the Process ID you want to terminate.
* @param signal - the signal to kill the processes with. Defaults to `"SIGKILL"`
* if it's empty or not defined.
* @param opts - options object.
* @throws {Error} - if something went wrong.
*/
export default function terminate(pid: number, signal: string, opts?: TerminateOptions): Promise<void>;
/**
* `terminate` is an ultra-simple way to kill all the node processes
* by providing a process pid. It finds all child processes and shuts
* them down too, so you don't have to worry about lingering processes.
*
* @param pid - the Process ID you want to terminate.
* @param opts - options object.
* @throws {Error} - if something went wrong.
*/
export default function terminate(pid: number, opts: TerminateOptions): Promise<void>;
}