import type { Properties, Node, Element, Root } from 'hast'; import type { OrgNode, OrgData } from 'uniorg'; declare module 'unist' { interface Data { hProperties?: Properties; } } type Hast = Root['children'][number]; type Handler = (this: OrgToHast, org: T) => Hast | null | (Hast | null)[]; export type Handlers = { [K in OrgNode['type']]?: Handler; }; export interface OrgToHastOptions { imageFilenameExtensions: string[]; /** * Whether to wrap org sections into
. */ useSections: boolean; /** * A function to wrap footnotes. First argument of the function is * an array of all footnote definitions and the function should * return a new Hast node to be appended to the document. * * Roughly corresponds to `org-html-footnotes-section`. * * Default is: * ``` *

Footnotes:

* {...footnotes} * ``` */ footnotesSection: (footnotes: Hast[]) => Hast[]; handlers: Handlers; } export declare function orgToHast(org: OrgData, opts?: Partial): Root; declare class OrgToHast { private options; private footnotesOrder; private footnotes; private handlers; constructor(options: Partial); toHast(node: OrgData, parent: null): Root; toHast(node: OrgNode | null, parent: OrgNode | null): Hast | null; toHast(node: (OrgNode | null)[], parent: OrgNode | null): Hast[]; /** * Similar to `hast` but respects `hProperties`. */ h(node: OrgNode | null, selector?: string, properties?: Properties, children?: string | Node | null | Array): Element; } export {};