/** * Minify whitespace. * * @type {import('unified').Plugin<[Options?]|Array, Root>} */ export default function rehypeMinifyWhitespace( options?: void | Options | undefined ): | void | import('unified').Transformer export type Root = import('hast').Root export type Element = import('hast').Element export type Text = import('hast').Text export type Node = Root | Root['children'][number] export type Options = { /** * If `newlines: true`, collapses whitespace containing newlines to `'\n'` * instead of `' '`. * The default is to collapse to a single space. */ newlines?: boolean | undefined } export type Whitespace = 'pre' | 'nowrap' | 'pre-wrap' | 'normal' export type Context = { collapse: ReturnType whitespace: Whitespace before?: boolean | undefined after?: boolean | undefined } export type Result = { remove: boolean ignore: boolean stripAtStart: boolean } /** * @param {(value: string) => string} replace */ declare function collapseFactory( replace: (value: string) => string ): (value: string) => string export {}