io-ts-types
Version:
A collection of codecs and combinators for use with io-ts
17 lines (16 loc) • 454 B
TypeScript
import { Ord } from 'fp-ts/Ord'
import * as t from 'io-ts'
/**
* @since 0.5.19
*/
export interface MapFromEntriesC<K extends t.Mixed, V extends t.Mixed>
extends t.Type<Map<t.TypeOf<K>, t.TypeOf<V>>, Array<[t.OutputOf<K>, t.OutputOf<V>]>, unknown> {}
/**
* @since 0.5.19
*/
export declare function mapFromEntries<K extends t.Mixed, V extends t.Mixed>(
keyCodec: K,
KO: Ord<t.TypeOf<K>>,
valueCodec: V,
name?: string
): MapFromEntriesC<K, V>