UNPKG

@prismicio/client

Version:

The official JavaScript + TypeScript client library for Prismic

25 lines (24 loc) 806 B
"use strict"; Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" }); const types = require("./types.cjs"); const wrapMapSerializer = (mapSerializer) => { return (type, node, text, children, key) => { const tagSerializer = mapSerializer[types.RichTextReversedNodeType[type] || type]; if (tagSerializer) { return tagSerializer({ // @ts-expect-error cannot type check here type, // @ts-expect-error cannot type check here node, // @ts-expect-error cannot type check here text, // @ts-expect-error cannot type check here children, // @ts-expect-error cannot type check here key }); } }; }; exports.wrapMapSerializer = wrapMapSerializer; //# sourceMappingURL=wrapMapSerializer.cjs.map