/** * Search `tree` for a start and end comments matching `name` and change their * “section” with `handler`. * * @param {Nodes} node * Tree to search. * @param {string} name * Comment name to look for. * @param {Handler} handler * Handle a section. * @returns {undefined} * Nothing. */ export function zone(node: Nodes, name: string, handler: Handler): undefined; export type Nodes = import('mdast').Nodes; export type Parents = import('mdast').Parents; /** * Extra info. */ export type Info = { /** * Parent of the section. */ parent: Parents; /** * Index of `start` in `parent`. */ start: number; /** * Index of `end` in `parent`. */ end: number; }; /** * Callback called when a section is found. */ export type Handler = (start: Nodes, between: Array, end: Nodes, info: Info) => Array | null | undefined | void;