Convert all remaining files to typescript.

This commit is contained in:
Jas Singh
2024-07-26 23:11:33 -07:00
parent ca5dcc629b
commit b511d76e11
84 changed files with 2075 additions and 1987 deletions

25
lib/types/gpustat.d.ts vendored Normal file
View File

@@ -0,0 +1,25 @@
export type GPU_Stat_Process = {
username: string;
command: string;
full_command: string[];
gpu_memory_usage: number;
cpu_percent: number;
cpu_memory_usage: number;
pid: number;
};
export type GPU_Stat = {
index: number;
uuid: string;
name: string;
"temperature.gpu": number;
"fan.speed": number;
"utilization.gpu": number;
"utilization.enc": number;
"utilization.dec": number;
"power.draw": number;
"enforced.power.limit": number;
"memory.used": number;
"memory.total": number;
processes: Process[];
};

10
lib/types/network.d.ts vendored Normal file
View File

@@ -0,0 +1,10 @@
export type AccessPoint = {
bssid: string | null;
address: string | null;
lastSeen: number;
ssid: string | null;
active: boolean;
strength: number;
frequency: number;
iconName: string | undefined;
}

View File

@@ -1 +1,3 @@
export type Unit = "imperial" | "metric";
export type PowerOptions = "sleep" | "reboot" | "logout" | "shutdown";
export type NotificationAnchor = "top" | "top right" | "top left" | "bottom" | "bottom right" | "bottom left";

1
lib/types/power.d.ts vendored Normal file
View File

@@ -0,0 +1 @@
export type Action = "sleep" | "reboot" | "logout" | "shutdown";

3
lib/types/widget.d.ts vendored Normal file
View File

@@ -0,0 +1,3 @@
export type Exclusivity = 'normal' | 'ignore' | 'exclusive';
export type Anchor = "left" | "right" | "top" | "down";
export type Transition = "none" | "crossfade" | "slide_right" | "slide_left" | "slide_up" | "slide_down";