@mintlify/common
Version:
Commonly shared code within Mintlify
13 lines (12 loc) • 506 B
TypeScript
import type { Root } from 'mdast';
/**
* Removes the YAML frontmatter node from an AST (Root) if it exists as the first child.
* Modifies the tree in place.
* @param tree The Root node of the document.
*/
export declare const removeFrontmatterFromAST: (tree: Root) => void;
/**
* Transforms `const X = ...; export default X;` into `export const X = ...;`
* so that the content is valid MDX ESM. Modifies the tree in place.
*/
export declare const normalizeDefaultExportInTree: (tree: Root) => void;