UNPKG

ts-mls

Version:

[![CI](https://github.com/LukaJCB/ts-mls/actions/workflows/ci.yml/badge.svg)](https://github.com/LukaJCB/ts-mls/actions/workflows/ci.yml) [![npm version](https://badge.fury.io/js/ts-mls.svg)](https://badge.fury.io/js/ts-mls) [![Coverage Status](https://co

10 lines (9 loc) 482 B
export type Encoder<T> = (t: T) => Uint8Array; export declare function contramapEncoders<T extends unknown[], R>(encoders: { [K in keyof T]: Encoder<T[K]>; }, toTuple: (input: R) => T): Encoder<R>; export declare function composeEncoders<T extends unknown[]>(encoders: { [K in keyof T]: Encoder<T[K]>; }): Encoder<T>; export declare function contramapEncoder<T, U>(enc: Encoder<T>, f: (u: U) => Readonly<T>): Encoder<U>; export declare function encodeVoid<T>(): Encoder<T>;