import * as log4js from '@log4js-node/log4js-api'; import { CharacteristicGetCallback, CharacteristicSetCallback, CharacteristicValue, Service, WithUUID } from 'hap-nodejs'; import * as HB from 'homebridge'; import { Logging } from 'homebridge/lib/logger'; import { ISYNode } from 'isy-nodejs'; import { DeviceFilterRule, PlatformConfig } from 'typings/config'; export declare const didFinishLaunching: symbol; export declare let Hap: any; declare global { interface Promise { handleWith(callback: (...arg: any) => void): Promise; } } export declare function isMatch(device: ISYNode, filter: DeviceFilterRule): boolean; export declare function cleanConfig(config: PlatformConfig): PlatformConfig; export declare function onSet(character: HB.Characteristic, func: (arg: T) => Promise, converter?: (char: WithUUID, arg: CharacteristicValue) => any): HB.Characteristic; export declare function toCelsius(temp: number): any; export declare function toFahrenheit(temp: number): any; export declare function onGet(character: HB.Characteristic, func: () => T): HB.Characteristic; export declare function isType>(instance: HB.Characteristic, characteristic?: K): boolean; export interface LoggerLike extends Partial { prefix?: string; (msg: any): void; default(msg: any): void; } declare module 'homebridge/lib/platformAccessory' { interface PlatformAccessory { getOrAddService>(service: T): Service; } } declare module 'homebridge/lib/logger' { interface Logger extends LoggerLike { } interface Logging extends LoggerLike { } } declare module 'hap-nodejs/dist/lib/Characteristic' { interface Characteristic { onSet(func: (...args: any) => Promise, converter?: (char: HB.Characteristic, arg: CharacteristicValue) => any): HB.Characteristic; onGet(func: () => T | Promise, converter?: (char: HB.Characteristic, arg: CharacteristicValue) => any): HB.Characteristic; } } export declare function clone(logger: Logging, prefix: string): Logging; export declare function wire(logger: Logging): void; export declare function addGetCallback(func: (...args: any[]) => Promise): (arg: any, cb: CharacteristicGetCallback) => void; export declare function addSetCallback(func: (arg: T) => Promise): (arg: T, cb: CharacteristicSetCallback) => void; export declare function addCallback(func: (...args: any[]) => Promise): (arg: any, cb: CharacteristicSetCallback) => void; //# sourceMappingURL=utils.d.ts.map