svelte-ast-print
Version:
Serialize Svelte AST nodes into stringified syntax. A.k.a parse in reverse.
37 lines • 1.02 kB
TypeScript
/**
* Printers related to Svelte **HTML**-related AST nodes only.
* @module svelte-ast-print/template/html
*/
import type { AST as SV } from "svelte/compiler";
import type { PrintOptions } from "../_internal/option.js";
import { type Result } from "../_internal/shared.js";
/**
* @since 1.0.0
* @__NO_SIDE_EFFECTS__
*/
export declare function printHTMLNode(n: SV.HTMLNode, opts: Partial<PrintOptions>): Result<SV.HTMLNode>;
/**
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Comment}
*
* @example pattern
* ```html
* <!--data-->
* ```
*
* @since 1.0.0
* @__NO_SIDE_EFFECTS__
*/
export declare function printComment(n: SV.Comment, opts?: Partial<PrintOptions>): Result<SV.Comment>;
/**
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Text}
*
* @example pattern
* ```html
* <!--data-->
* ```
*
* @since 1.0.0
* @__NO_SIDE_EFFECTS__
*/
export declare function printText(n: SV.Text, opts?: Partial<PrintOptions>): Result<SV.Text>;
//# sourceMappingURL=html.d.ts.map