homebridge-homeconnect
Version:
A Homebridge plugin that connects Home Connect appliances to Apple HomeKit
26 lines • 1.79 kB
TypeScript
import { CheckerT, ICheckerSuite, IErrorDetail, ITypeSuite, TType } from 'ts-interface-checker';
export declare const MS = 1000;
export type Copy<T> = {
[K in keyof T]: T[K];
};
export type Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>;
export type Constructor<T = object> = new (...args: any[]) => T;
export declare function assertIsDefined<Type>(value: Type): asserts value is NonNullable<Type>;
export declare function assertIsUndefined(value: unknown): asserts value is undefined;
export declare function assertIsString(value: unknown): asserts value is string;
export declare function assertIsNumber(value: unknown): asserts value is number;
export declare function assertIsBoolean(value: unknown): asserts value is boolean;
export declare function assertIsInstanceOf<Type extends object>(value: unknown, type: Constructor<Type>): asserts value is Type;
export declare function formatMilliseconds(ms: number, maxParts?: number): string;
export declare function formatSeconds(seconds: number, maxParts?: number): string;
export declare function formatList(items: string[]): string;
export declare function plural(count: number, noun: string | [string, string], showCount?: boolean): string;
export declare function columns(rows: string[][], separator?: string): string[];
export declare function deepMerge<Type extends object>(...objects: [Type, ...Partial<Type>[]]): Type;
export type AtTType<Keys extends string | symbol> = ITypeSuite & Record<Keys, TType>;
export type AsCheckerT<Keys extends string | symbol> = ICheckerSuite & {
[Key in Keys]: CheckerT<Key>;
};
export declare function getValidationTree(errors: IErrorDetail[]): string[];
export declare function keyofChecker(typeSuite: ITypeSuite, type: TType): string[];
//# sourceMappingURL=utils.d.ts.map