import * as E from 'fp-ts/Either'; import * as t from 'io-ts'; /** * Format an `Errors` object as a human-readable `string`. See `decode` in `decode.ts` for an example. * Inspired by * https://github.com/mmkal/ts/blob/94a9ba8f2931c9c91122d00b0bf1bd21b2be05cd/packages/io-ts-extra/src/reporters.ts#L11. */ export declare const validationErrors: (typeAlias: string) => (errors: t.Errors) => string; export declare function decode(codecName: string, codec: t.Type, u: I): E.Either; /** * Decodes input `value` with `codec`. When decoding fails, calls the `orElse` function with the error message from * `validationErrors`. */ export declare function decodeOrElse(codecName: string, codec: t.Type, value: I, orElse: (errors: string) => E): E | A; //# sourceMappingURL=decode.d.ts.map