import { Parent , Content , BlockContent } from 'mdast' ; import { processor } from './processor' ; import toMdast from 'hast-util-to-mdast' ; import { AllMdastConfig } from '../types' ; export const htmlToHast = ( html ) => processor . parse ( html ) ; export const htmlToMdast = ( html ) : Parent => toMdast ( htmlToHast ( html ) ) ; export const isAvailableBlockContent = ( content , allMdastConfig ) : content is BlockContent => content . type in allMdastConfig ;