UNPKG

homebridge-homeconnect

Version:

A Homebridge plugin that connects Home Connect appliances to Apple HomeKit

27 lines 1.1 kB
import { Logger } from 'homebridge'; export type SerialisedValue = unknown; export type SerialisedOperation<Value extends SerialisedValue, Returns = void> = (value: Value) => Promise<Returns> | Returns; export interface SerialisedOptions { name?: string; reset?: boolean; verbose?: boolean; } export declare class Serialised<Value extends SerialisedValue, Returns = void> { readonly log: Logger; readonly operation: SerialisedOperation<Value, Returns>; readonly defaultValue: Value; readonly options: SerialisedOptions; private activePromise?; private pendingValue; private pendingPromise?; private counter; constructor(log: Logger, operation: SerialisedOperation<Value, Returns>, defaultValue: Value, options?: SerialisedOptions); trigger(value?: Value): Promise<Returns>; startPending(): Promise<Returns>; startActive(value: Value): Promise<Returns>; updatePendingValue(value?: Value): void; resetPendingValue(): void; get logPrefix(): string; logVerbose(message: string): void; } //# sourceMappingURL=serialised.d.ts.map