UNPKG

polyfact-io-ts

Version:

A modified version of io-ts, the TypeScript runtime type system for IO decoding/encoding, to fit with the needs of the Polyfact project.

15 lines (14 loc) 431 B
import { memoize } from './Schemable'; // ------------------------------------------------------------------------------------- // constructors // ------------------------------------------------------------------------------------- /** * @category constructors * @since 2.2.0 */ export function make(schema) { return memoize(schema); } export function interpreter(S) { return function (schema) { return schema(S); }; }