-
-
Notifications
You must be signed in to change notification settings - Fork 34
/
Copy pathindex.d.ts
61 lines (45 loc) · 1.1 KB
/
index.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
53
54
55
56
57
58
59
60
61
export type Options = {
/**
Force kill the processes.
@default false
*/
readonly force?: boolean;
/**
Force kill processes that did not exit within the given number of milliseconds.
@default undefined
*/
readonly forceAfterTimeout?: number;
/**
Kill all child processes along with the parent process. _(Windows only)_
@default true
*/
readonly tree?: boolean;
/**
Ignore capitalization when killing a process.
Note that the case is always ignored on Windows.
@default false
*/
readonly ignoreCase?: boolean;
/**
Suppress all error messages. For example: `Process doesn't exist`.
@default false
*/
readonly silent?: boolean;
};
/**
Fabulously kill processes. Cross-platform.
@param input - One or more process IDs/names/ports to kill. To kill a port, prefix it with a colon. For example: `:8080`.
@example
```
import fkill from 'fkill';
await fkill(1337);
console.log('Killed process');
fkill('Safari');
fkill(':8080');
fkill([1337, 'Safari', ':8080']);
```
*/
export default function fkill(
input: number | string | ReadonlyArray<string | number>,
options?: Options
): Promise<void>;