@prismicio/mock
Version:
Generate mock Prismic documents, fields, Slices, and models for development and testing environments
10 lines (9 loc) • 683 B
TypeScript
import * as prismic from "@prismicio/client";
import { ValueForModelMapConfigs } from "../lib/valueForModelMap";
import { MockValueConfig, ModelValue } from "../types";
export type MockCustomTypeValueConfig<Model extends prismic.CustomTypeModel = prismic.CustomTypeModel> = {
withURL?: boolean;
alternateLanguages?: prismic.PrismicDocument[];
configs?: ValueForModelMapConfigs;
} & MockValueConfig<Model>;
export declare const customType: <Model extends prismic.CustomTypeModel<string, prismic.CustomTypeModelDefinition<string>> = prismic.CustomTypeModel<string, prismic.CustomTypeModelDefinition<string>>>(config: MockCustomTypeValueConfig<Model>) => ModelValue<Model>;