updated docs, updated type definition

This commit is contained in:
Sebastian Hildebrandt 2021-09-15 17:56:01 +02:00
parent 53569b272f
commit d28ecbae24
3 changed files with 28 additions and 14 deletions

View File

@ -287,20 +287,29 @@ Full function reference with examples can be found at [https://systeminformation
| --------------- | ------------- | ----- | ------- | --- | --- | --- | -------- |
| si.graphics(cb) | {...} | X | | X | X | | arrays of graphics controllers and displays |
| | controllers[]| X | | X | X | | graphics controllers array |
| | ...[0].model | X | | X | X | | graphics controller model |
| | ...[0].vendor | X | | X | X | | e.g. ATI |
| | ...[0].deviceName | | | | X | | e.g. \\\\.\\DISPLAY1 |
| | ...[0].vendorId | | | X | | | vendor ID |
| | ...[0].model | X | | X | X | | graphics controller model |
| | ...[0].deviceId | | | X | | | device ID |
| | ...[0].bus | X | | X | X | | on which bus (e.g. PCIe) |
| | ...[0].vram | X | | X | X | | VRAM size (in MB) |
| | ...[0].vramDynamic | X | | X | X | | true if dynamicly allocated ram |
| | ...[0].external | | | X | | | is external GPU |
| | ...[0].cores | | | X | | | Apple silicon only |
| | ...[0].metalVersion | | | X | | | Apple Metal Version |
| | displays[] | X | | X | X | | monitor/display array |
| | ...[0].vendor | | | | X | | monitor/display vendor |
| | ...[0].vendorId | | | X | | | vendor ID |
| | ...[0].deviceName | | | | X | | e.g. \\\\.\\DISPLAY1 |
| | ...[0].model | X | | X | X | | monitor/display model |
| | ...[0].productionYear | | | X | | | production year |
| | ...[0].serial | | | X | | | serial number |
| | ...[0].displayId | | | X | | | display ID |
| | ...[0].main | X | | X | X| | true if main monitor |
| | ...[0].builtin | X | | X | | | true if built in monitor |
| | ...[0].connection | X | | X | X | | e.g. DisplayPort or HDMI |
| | ...[0].sizeX | X | | X | X | | size in mm horizontal |
| | ...[0].sizeY | X | | X | X | | size in mm vertical |
| | ...[0].sizeX | X | | | X | | size in mm horizontal |
| | ...[0].sizeY | X | | | X | | size in mm vertical |
| | ...[0].pixelDepth | X | | X | X | | color depth in bits |
| | ...[0].resolutionX | X | | X | X | | pixel horizontal |
| | ...[0].resolutionY | X | | X | X | | pixel vertical |

View File

@ -461,7 +461,7 @@
<td>...[0].sizeX</td>
<td>X</td>
<td></td>
<td>X</td>
<td></td>
<td>X</td>
<td></td>
<td>size in mm horizontal</td>
@ -471,7 +471,7 @@
<td>...[0].sizeY</td>
<td>X</td>
<td></td>
<td>X</td>
<td></td>
<td>X</td>
<td></td>
<td>size in mm vertical</td>

21
lib/index.d.ts vendored
View File

@ -151,16 +151,16 @@ export namespace Systeminformation {
info_name: string;
type: string;
protocol: string;
}
};
model_family?: string,
model_name?: string,
serial_number?: string,
firmware_version?: string,
smart_status: {
passed: boolean;
}
};
trim?: {
supported: boolean
supported: boolean;
},
ata_smart_attributes?: {
revision: number;
@ -181,7 +181,7 @@ export namespace Systeminformation {
event_count: boolean;
auto_keep: boolean;
};
raw: { value: number; string: string }
raw: { value: number; string: string; };
}[];
};
ata_smart_error_log?: {
@ -209,10 +209,10 @@ export namespace Systeminformation {
error_count_total: number;
error_count_outdated: number;
};
}
};
nvme_pci_vendor?: {
id: number,
subsystem_id: number
subsystem_id: number;
},
nvme_smart_health_information_log?: {
critical_warning?: number,
@ -232,11 +232,11 @@ export namespace Systeminformation {
num_err_log_entries?: number,
warning_temp_time?: number,
critical_comp_time?: number,
temperature_sensors?: number[]
temperature_sensors?: number[];
},
user_capacity?: {
blocks: number,
bytes: number
bytes: number;
},
logical_block_size?: number,
temperature: {
@ -294,11 +294,16 @@ export namespace Systeminformation {
interface GraphicsControllerData {
vendor: string;
vendorId?: string;
model: string;
deviceId?: string;
bus: string;
busAddress?: string;
vram: number;
vramDynamic: boolean;
external?: boolean;
cores?: number;
metalVersion?: string;
subDeviceId?: string;
driverVersion?: string;
name?: string;