UNPKG

@prismicio/client

Version:

The official JavaScript + TypeScript client library for Prismic

25 lines (23 loc) 955 B
import { RichTextField } from "../types/value/richText.js"; import { RichTextFunctionSerializer } from "./types.js"; //#region src/richtext/serialize.d.ts /** * Serializes a rich text field with a given serializer. * * @remarks * This is a low-level helper mainly intended to be used by higher-level * packages. Most users aren't expected to use this function directly. * * @typeParam SerializerReturnType - Return type of the serializer. * * @param richTextField - A rich text field from Prismic. * @param serializer - A function serializer to apply. * * @returns An array of serialized nodes. * * @see Learn how to work with rich text fields: {@link https://prismic.io/docs/fields/rich-text} */ declare const serialize: <SerializerReturnType>(richTextField: RichTextField, serializer: RichTextFunctionSerializer<SerializerReturnType>) => SerializerReturnType[]; //#endregion export { serialize }; //# sourceMappingURL=serialize.d.ts.map