mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* Add types definition for find-process * Add new line at EOF * Compile TS LINT * 1. change import syntax. 2. Remove comments.
17 lines
539 B
TypeScript
17 lines
539 B
TypeScript
/// <reference types="node" />
|
|
|
|
import find = require('find-process');
|
|
|
|
find('pid', 12345).then((processList) => {
|
|
processList.forEach((ps) => {
|
|
console.log('Full command with args: ' + ps.cmd);
|
|
console.log('User group ID (for *nix): ' + ps.gid);
|
|
console.log('command/process name: ' + ps.name);
|
|
console.log('Process ID: ' + ps.pid);
|
|
console.log('Parent process ID: ' + ps.ppid);
|
|
console.log('User ID (for *nix): ' + ps.uid);
|
|
});
|
|
}, (err) => {
|
|
console.log(err.stack || err);
|
|
});
|