@prismicio/types-internal
Version:
Prismic types for Custom Types and Prismic Data
10 lines (9 loc) • 857 B
TypeScript
import { type NestableWidget, type SlicePrimaryWidget, Group } from "../../customtypes";
import { GroupContent } from "./GroupContent";
import type { NestableContent } from "./nestable";
import type { SlicePrimaryContent } from "./slices/Slice/SlicePrimaryContent";
export declare function withDefaultSlicePrimaryContentValues(customType: Record<string, SlicePrimaryWidget>, content: Partial<Record<string, SlicePrimaryContent>>): Record<string, SlicePrimaryContent>;
export declare function withDefaultNestableContentValues(customType: Record<string, NestableWidget>, content: Record<string, NestableContent>): Record<string, NestableContent>;
export declare function repeatableContentWithDefaultNestableContentValues<T extends {
value: [string, GroupContent | NestableContent][];
}>(fields: Record<string, Group | NestableWidget>, content: T[]): T[];