UNPKG

decline-ts

Version:

Composable command-line parser for TypeScript - a (partial) porting of Scala decline using fp-ts

7 lines (6 loc) 474 B
import { either, readonlyNonEmptyArray } from 'fp-ts'; import * as t from 'io-ts'; import * as D from 'io-ts/Decoder'; import { ValidatedNea } from '../ValidatedNea'; export declare const typeToDecode: <I, A>(decoder: t.Decoder<I, A>) => (u: I) => either.Either<readonlyNonEmptyArray.ReadonlyNonEmptyArray<string>, A>; export declare const decoderToDecode: <I, A>(decoder: D.Decoder<I, A>) => (u: I) => either.Either<readonlyNonEmptyArray.ReadonlyNonEmptyArray<string>, A>;