@prismicio/types-internal
Version:
Prismic types for Custom Types and Prismic Data
15 lines (14 loc) • 517 B
TypeScript
import * as t from "io-ts";
import { FieldType } from "./fields";
declare type WithFieldType = WithContentType & {
type: FieldType;
};
export declare function hasFieldContentType(obj: unknown): obj is WithFieldType;
declare type WithContentType = {
__TYPE__: string;
};
export declare function hasContentType(obj: unknown): obj is WithContentType;
export declare function withKey<C extends t.Mixed>(codec: C): t.IntersectionC<[t.ExactC<t.TypeC<{
key: t.Type<string, string, unknown>;
}>>, C]>;
export {};