UNPKG

contentful-rich-text-html-parser

Version:
15 lines (14 loc) 1.23 kB
import { Block, BLOCKS, Document, Inline, INLINES, Mark, MARKS, Node, NodeData, Text, TopLevelBlock, TopLevelBlockEnum } from "@contentful/rich-text-types"; export declare const isNotNull: <T>(value: T) => value is Exclude<T, null>; export declare const isWhiteSpace: (content: string) => boolean; export declare const getAsList: <T>(value: T | T[]) => T[]; export declare const isBlockType: (nodeType: BLOCKS | MARKS | INLINES) => nodeType is BLOCKS; export declare const isInlineType: (nodeType: BLOCKS | MARKS | INLINES) => nodeType is INLINES; export declare const isMarkType: (nodeType: BLOCKS | MARKS | INLINES) => nodeType is MARKS; export declare const isTopLevelBlock: (nodeType: BLOCKS | MARKS | INLINES) => nodeType is TopLevelBlockEnum; export declare const isNodeTypeBlock: (node: Node) => node is Block; export declare const isNodeTypeTopLevelBlock: (node: Node) => node is TopLevelBlock; export declare const isNodeTypeInline: (node: Node) => node is Inline; export declare const isNodeTypeMark: (node: Node | Text | Mark) => node is Mark; export declare const isNodeTypeText: (node: Node | Text | Mark) => node is Text; export declare const createDocumentNode: (content: TopLevelBlock[], data?: NodeData) => Document;