import Long from "../Long"; import { Field, LengthDelimited } from "./index"; type WireValueToTsValue = (wireValue: Field) => T | undefined; type TsValueToWireValue = (tsValue: T) => Field; type Unpack = (wireValues: Iterable) => Generator; type Pack = (values: T[]) => LengthDelimited; interface WireValueToTsValueFns extends NumericWireValueToTsValueFns { string: WireValueToTsValue; bytes: WireValueToTsValue; } interface TsValueToWireValueFns extends TsValueToNumericWireValueFns { string: TsValueToWireValue; bytes: TsValueToWireValue; } interface NumericWireValueToTsValueFns extends VarintFieldToTsValueFns { double: WireValueToTsValue; float: WireValueToTsValue; fixed32: WireValueToTsValue; fixed64: WireValueToTsValue; sfixed32: WireValueToTsValue; sfixed64: WireValueToTsValue; } interface TsValueToNumericWireValueFns extends TsValueToVarintFieldFns { double: TsValueToWireValue; float: TsValueToWireValue; fixed32: TsValueToWireValue; fixed64: TsValueToWireValue; sfixed32: TsValueToWireValue; sfixed64: TsValueToWireValue; } type DecodeVarintFns = typeof decodeVarintFns; declare const decodeVarintFns: { int32: (long: Long) => number; int64: (long: Long) => string; uint32: (long: Long) => number; uint64: (long: Long) => string; sint32: (long: Long) => number; sint64: (long: Long) => string; bool: (long: Long) => boolean; }; type VarintFieldToTsValueFns = typeof varintFieldToTsValueFns; declare const varintFieldToTsValueFns: { [type in keyof DecodeVarintFns]: WireValueToTsValue>; }; type TsValueToVarintFieldFns = typeof tsValueToVarintFieldFns; declare const tsValueToVarintFieldFns: { [type in keyof DecodeVarintFns]: TsValueToWireValue>; }; export declare const wireValueToTsValueFns: WireValueToTsValueFns; export declare const tsValueToWireValueFns: TsValueToWireValueFns; type UnpackFns = { [type in keyof NumericWireValueToTsValueFns]: Unpack>>; }; export declare const unpackFns: UnpackFns; type PackFns = { [type in keyof NumericWireValueToTsValueFns]: Pack>>; }; export declare const packFns: PackFns; export {};