UNPKG

io-ts-types

Version:

A collection of codecs and combinators for use with io-ts

20 lines (19 loc) 523 B
/** * @since 0.5.19 */ import { Ord } from 'fp-ts/lib/Ord' import * as t from 'io-ts' /** * @since 0.5.19 */ export interface ReadonlyMapFromEntriesC<K extends t.Mixed, V extends t.Mixed> extends t.Type<ReadonlyMap<t.TypeOf<K>, t.TypeOf<V>>, ReadonlyArray<[t.OutputOf<K>, t.OutputOf<V>]>, unknown> {} /** * @since 0.5.19 */ export declare function readonlyMapFromEntries<K extends t.Mixed, V extends t.Mixed>( keyCodec: K, KO: Ord<t.TypeOf<K>>, valueCodec: V, name?: string ): ReadonlyMapFromEntriesC<K, V>