find-process: Provides its own types (#39609)

This commit is contained in:
Alexander T
2019-11-04 23:41:27 +02:00
committed by Nathan Shively-Sanders
parent 8b279a1f92
commit de4836c8a8
5 changed files with 6 additions and 45 deletions

View File

@@ -1302,6 +1302,12 @@
"sourceRepoURL": "https://github.com/sindresorhus/filter-console",
"asOfVersion": "0.1.1"
},
{
"libraryName": "find-process",
"typingsPackageName": "find-process",
"sourceRepoURL": "https://github.com/yibn2008/find-process",
"asOfVersion": "1.2.0"
},
{
"libraryName": "find-java-home",
"typingsPackageName": "find-java-home",

View File

@@ -1,16 +0,0 @@
/// <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);
});

View File

@@ -1,10 +0,0 @@
// Type definitions for find-process 1.1
// Project: https://github.com/yibn2008/find-process
// Definitions by: Buaban Buataitom <https://github.com/buaban>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
declare function find(by: string, value: string | number): Promise<Array<{ pid: string, ppid: string, uid: string, gid: string, name: string, cmd: string }>>;
declare namespace find {}
export = find;

View File

@@ -1,16 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": ["es6"],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": ["../"],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": ["index.d.ts", "find-process-tests.ts"]
}

View File

@@ -1,3 +0,0 @@
{
"extends": "dtslint/dt.json"
}