lib: add typing for dbus related variant and bytearray functions

This commit is contained in:
Jelle van der Waa 2024-04-12 18:07:32 +02:00 committed by Jelle van der Waa
parent 9b843c89d6
commit c43b3289d8
1 changed files with 9 additions and 0 deletions

View File

@ -134,8 +134,17 @@ declare module 'cockpit' {
close(): void;
}
type VariantType = string | Uint8Array | number | boolean | VariantType[];
interface Variant {
t: string;
v: VariantType;
}
function dbus(name: string | null, options?: DBusOptions): DBusClient;
function variant(type: string, value: VariantType): Variant;
function byte_array(string: string): string;
/* === cockpit.file ========================== */
interface FileSyntaxObject<T, B> {