datocms-contentful-to-structured-text
Version:
Convert Contentful Rich Text to a valid DatoCMS Structured Text `dast` document
6 lines (5 loc) • 377 B
TypeScript
import { Node } from 'datocms-structured-text-utils';
import { Handler, Context, ContentfulNode } from './types';
export declare function makeHandler<T extends ContentfulNode>(guard: (node: ContentfulNode) => node is T, handle: (node: T, context: Context) => Promise<Node | Array<Node> | void>): Handler;
export declare const handlers: Array<Handler>;
export type { Handler };