UNPKG

@iotize/tap

Version:

IoTize Device client for Javascript

30 lines (29 loc) 1.07 kB
import { BodyDecoder, BodyEncoder } from '@iotize/tap/client/api'; /** * TODO improv it . We don't know the size of input buffer... */ export declare class UniqMaskConverter<OutputType> implements BodyEncoder<OutputType>, BodyDecoder<OutputType> { protected _mapping: { [key: number]: OutputType; }; constructor(mapping: any); decode(body: Uint8Array): OutputType; encode(value: OutputType): Uint8Array; static decodeOneExact<OutputType>(data: Uint8Array | number, mapping: { [key: number]: OutputType; }): OutputType; static decodeOne<OutputType>(data: Uint8Array | number, mapping: { [key: number]: OutputType; }): OutputType; static encodeOneAsNumber<OutputType>(data: OutputType, mapping: { [key: number]: OutputType; }): number; static encodeOneAsBuffer<OutputType>(data: OutputType, mapping: { [key: number]: OutputType; }): Uint8Array; static swapKeyValue(input: { [key: string]: any; }): { [key: string]: any; }; }