typescript typings fix cpuCurrentSpeed

This commit is contained in:
Sebastian Hildebrandt
2021-01-30 07:26:03 +01:00
parent 8bc006f60c
commit 4803bdd206
6 changed files with 15 additions and 10 deletions
+1 -1
View File
@@ -790,7 +790,7 @@ export function uuid(cb?: (data: Systeminformation.UuidData) => any): Promise<Sy
export function cpu(cb?: (data: Systeminformation.CpuData) => any): Promise<Systeminformation.CpuData>;
export function cpuFlags(cb?: (data: string) => any): Promise<string>;
export function cpuCache(cb?: (data: Systeminformation.CpuCacheData) => any): Promise<Systeminformation.CpuCacheData>;
export function cpuCurrentspeed(cb?: (data: Systeminformation.CpuCurrentSpeedData) => any): Promise<Systeminformation.CpuCurrentSpeedData>;
export function cpuCurrentSpeed(cb?: (data: Systeminformation.CpuCurrentSpeedData) => any): Promise<Systeminformation.CpuCurrentSpeedData>;
export function cpuTemperature(cb?: (data: Systeminformation.CpuTemperatureData) => any): Promise<Systeminformation.CpuTemperatureData>;
export function currentLoad(cb?: (data: Systeminformation.CurrentLoadData) => any): Promise<Systeminformation.CurrentLoadData>;
export function fullLoad(cb?: (data: number) => any): Promise<number>;
+6 -8
View File
@@ -145,7 +145,7 @@ function getDynamicData(srv, iface, callback) {
// use closure to track ƒ completion
let functionProcessed = (function () {
let totalFunctions = 15;
if (_windows) { totalFunctions = 11; }
if (_windows) { totalFunctions = 13; }
if (_freebsd || _openbsd || _netbsd) { totalFunctions = 11; }
if (_sunos) { totalFunctions = 6; }
@@ -191,12 +191,10 @@ function getDynamicData(srv, iface, callback) {
functionProcessed();
});
if (!_windows) {
processes.processes().then(res => {
data.processes = res;
functionProcessed();
});
}
processes.processes().then(res => {
data.processes = res;
functionProcessed();
});
cpu.currentLoad().then(res => {
data.currentLoad = res;
@@ -236,7 +234,7 @@ function getDynamicData(srv, iface, callback) {
});
}
if (!_windows && !_sunos) {
if (!_sunos) {
processes.services(srv).then(res => {
data.services = res;
functionProcessed();