io-ts-types
Version:
A collection of codecs and combinators for use with io-ts
20 lines (19 loc) • 489 B
TypeScript
/**
* @since 0.5.7
*/
import * as t from 'io-ts'
/**
* @since 0.5.7
*/
export interface ReadonlyNonEmptyArray<A> extends ReadonlyArray<A> {
readonly 0: A
}
/**
* @since 0.5.7
*/
export interface ReadonlyNonEmptyArrayC<C extends t.Mixed>
extends t.Type<ReadonlyNonEmptyArray<t.TypeOf<C>>, ReadonlyNonEmptyArray<t.OutputOf<C>>, unknown> {}
/**
* @since 0.5.7
*/
export declare function readonlyNonEmptyArray<C extends t.Mixed>(codec: C, name?: string): ReadonlyNonEmptyArrayC<C>