io-ts-types
Version:
A collection of codecs and combinators for use with io-ts
12 lines (11 loc) • 354 B
TypeScript
import * as O from 'fp-ts/lib/Option'
import * as t from 'io-ts'
/**
* @since 0.5.0
*/
export interface OptionFromNullableC<C extends t.Mixed>
extends t.Type<O.Option<t.TypeOf<C>>, t.OutputOf<C> | null, unknown> {}
/**
* @since 0.5.0
*/
export declare function optionFromNullable<C extends t.Mixed>(codec: C, name?: string): OptionFromNullableC<C>