Add typings and jsdoc comments to improve developer experience

This commit is contained in:
Victor Hagelbäck 2021-03-29 12:48:27 +02:00
parent f219b4b2bf
commit 764a3ca223
9 changed files with 765 additions and 4 deletions

50
plejd/types/Configuration.d.ts vendored Normal file
View file

@ -0,0 +1,50 @@
/* eslint-disable no-use-before-define */
export interface AddonInfo {
name: string;
version: string;
slug: string;
description: string;
url: string;
arch: string[];
startup: string;
boot: string;
host_network: boolean;
host_dbus: boolean;
apparmor: boolean;
}
export interface Configuration extends AddonInfo {
options: Options;
schema: Schema;
}
export interface Options {
site: string;
username: string;
password: string;
mqttBroker: string;
mqttUsername: string;
mqttPassword: string;
includeRoomsAsLights: boolean;
preferCachedApiResponse: boolean;
updatePlejdClock: boolean;
logLevel: string;
connectionTimeout: number;
writeQueueWaitTime: number;
}
export interface Schema {
site: string;
username: string;
password: string;
mqttBroker: string;
mqttUsername: string;
mqttPassword: string;
includeRoomsAsLights: string;
preferCachedApiResponse: string;
updatePlejdClock: string;
logLevel: string;
connectionTimeout: string;
writeQueueWaitTime: string;
}