import { componentList } from '@kuma-ui/core/components/componentList'; import { JsxOpeningElement, JsxSelfClosingElement } from 'ts-morph'; /** * Optimizes JSX elements by converting Kuma components to raw HTML elements * during compilation, when possible. * * The transformation can only be applied when no runtime-affecting prefix * utility props are present. This is because these would necessitate runtime * processing and therefore an intermediary component. * * For example, a component would be converted to a
* based on the 'as' prop, or to the default HTML element for that component. * * @param {string} componentName - The name of the Kuma component. * @param {JsxOpeningElement|JsxSelfClosingElement} jsxElement - The JSX element to optimize. * @param {string|undefined} as - The HTML element to use as a replacement. */ declare const optimize: (componentName: keyof typeof componentList, jsxElement: JsxOpeningElement | JsxSelfClosingElement, as?: string) => void; export { optimize };