import type { Codec } from '../serializable/codec'; import type { Serializable } from '../serializable/common/types'; export type FromBytesReturn = T extends { fromBytes: (buff: Uint8Array, codec?: Codec) => [infer rType, Uint8Array]; } ? rType : T extends { fromBytes: (buff: Uint8Array, codec: Codec) => [infer rType, Uint8Array]; } ? rType : never; export type ReturnTypes = { [i in keyof T]: FromBytesReturn; }; export declare function unpack(buffer: Uint8Array, sers: O, codec?: Codec): [...ReturnTypes, Uint8Array]; export declare function pack(serializables: (Serializable | Serializable[])[], codec: Codec): Uint8Array; export declare function packSwitched(codec: Codec, ...serializables: (Serializable | Serializable[])[]): Uint8Array; //# sourceMappingURL=struct.d.ts.map