@iotize/tap
Version:
IoTize Device client for Javascript
13 lines (12 loc) • 729 B
TypeScript
import { IAccessor } from '@iotize/common/data-accessor';
import { VariableType } from '@iotize/tap/service/impl/variable';
export declare function isTruthy(v: string | number | undefined, falsyValue?: string[]): boolean;
export declare function convertToVariableType(accessor: IAccessor): VariableType.Data;
export declare function fromMapping<T>(data: IAccessor, attributeName: string, mapping: Record<string, T>, defaultValue?: string): T | undefined;
/**
* TODO add to common lib (toEnumFromValue)
* @param mapping
* @param value
*/
export declare function stringToEnum<OutputType>(mapping: any, value: string): OutputType;
export declare function mapKey<T>(object: T, key: keyof T, value: T[keyof T]): void;