@prismicio/types-internal
Version:
Prismic types for Custom Types and Prismic Data
6 lines (5 loc) • 566 B
TypeScript
import * as t from "io-ts";
export declare const DefaultOrElse: <I, A, O = A>(inputValidator: t.Type<I, I, unknown>) => (codec: t.Type<A, O, unknown>) => t.Type<A | null, O | undefined, unknown>;
export declare const NullOrElse: <A, O = A>(codec: t.Type<A, O, unknown>) => t.Type<A | null, O | undefined, unknown>;
export declare const EmptyObjectOrElse: <A, O = A>(codec: t.Type<A, O, unknown>) => t.Type<A | null, O | undefined, unknown>;
export declare const EmptyArrayOrElse: <A, O = A>(codec: t.Type<A, O, unknown>) => t.Type<A | null, O | undefined, unknown>;