UNPKG

homebridge-virtual-accessories

Version:
29 lines (28 loc) 1.39 kB
import { Timer } from './timer.js'; import { VirtualLogger } from './virtualLogger.js'; import { ZonedDateTime } from '@js-joda/core'; import '@js-joda/timezone'; /** * Utils */ export declare class Utils { static now(): ZonedDateTime; static zonedDateTime(datetime: string): ZonedDateTime; static secondsToHHmmss(seconds: number): string; static daysHoursMinutesSecondsToSeconds(days: number, hours: number, minutes: number, seconds: number): number; static secondsToDaysHoursMinutesSeconds(seconds: number): [number, number, number, number]; private static readonly debounceMillis; static debounce<T extends (...args: any[]) => void>(func: T, delayMillis?: number): (...args: any[]) => void; static delay(millis: number): Promise<unknown>; /** * Get the field name */ static proxiedPropertiesOf<TObj>(obj?: TObj): { [P in keyof TObj]?: P; }; static required(field: number | string | string[]): boolean; static notEmpty(field: string | string[]): boolean; static isPercentage(value: number): boolean; static isDegrees(value: number): boolean; static isValidTransition(value: number): boolean; static isValidTimeout(value: number): boolean; static restoreRunningTimer(timer: Timer, cachedStartTime: string, cachedDuration: number, callback: () => void, accessoryName: string, log: VirtualLogger): void; }