@prismicio/client
Version:
The official JavaScript + TypeScript client library for Prismic
1 lines • 1.65 kB
Source Map (JSON)
{"version":3,"file":"slice.cjs","sources":["../../../../src/types/model/slice.ts"],"sourcesContent":["import type { CustomTypeModelFieldForNestedGroup } from \"./types\"\n\nimport type { CustomTypeModelNestedGroupField } from \"./group\"\nimport type { CustomTypeModelSliceType } from \"./sliceZone\"\n\n/**\n * A Slice for a custom type.\n *\n * More details: {@link https://prismic.io/docs/slice}\n *\n * @typeParam NonRepeatFields - A record of fields that cannnot be repeated.\n * @typeParam RepeatFields - A record of fields that can be repeated.\n */\nexport interface CustomTypeModelSlice<\n\tNonRepeatFields extends Record<\n\t\tstring,\n\t\tCustomTypeModelFieldForNestedGroup\n\t> = Record<string, CustomTypeModelFieldForNestedGroup>,\n\tRepeatFields extends Record<\n\t\tstring,\n\t\tCustomTypeModelFieldForNestedGroup\n\t> = Record<string, CustomTypeModelFieldForNestedGroup>,\n> {\n\ttype: typeof CustomTypeModelSliceType.Slice\n\tfieldset?: string | null\n\tdescription?: string\n\ticon?: string\n\tdisplay?:\n\t\t| (typeof CustomTypeModelSliceDisplay)[keyof typeof CustomTypeModelSliceDisplay]\n\t\t| string\n\t\"non-repeat\"?: NonRepeatFields\n\trepeat?: RepeatFields\n}\n\n/**\n * Display type for a Slice.\n *\n * More details: {@link https://prismic.io/docs/slice}\n */\nexport const CustomTypeModelSliceDisplay = {\n\tList: \"list\",\n\tGrid: \"grid\",\n} as const\n\n/**\n * @deprecated - Legacy slice type. Do not use.\n */\nexport type CustomTypeModelLegacySlice =\n\t| CustomTypeModelNestedGroupField\n\t| CustomTypeModelFieldForNestedGroup\n"],"names":[],"mappings":";;AAuCO,MAAM,8BAA8B;AAAA,EAC1C,MAAM;AAAA,EACN,MAAM;;;"}