import type { Node } from "./builder"; import { type LineHighlight, type LineNumbers } from "./utils"; /** * Configuration options for a code-snippet element * @category Builder types * * @since 1.0.0 * @author Simon Kovtyk */ type Options = { /** * Language of the code-snippet * * @since 1.0.0 * @author Simon Kovtyk */ language?: string; /** * Language of the code-snippet * * @since 1.0.0 * @author Simon Kovtyk */ lineNumbers?: LineNumbers; /** * Language of the code-snippet * * @since 1.0.0 * @author Simon Kovtyk */ isRelative?: boolean; /** * Language of the code-snippet * * @since 1.0.0 * @author Simon Kovtyk */ section?: string; /** * Language of the code-snippet * * @since 1.0.0 * @author Simon Kovtyk */ lineHighlights?: LineHighlight[]; }; /** * Builder-element for a code-snippet * @param path - Path of the code-snippet * @param options - Additional options for this element * @returns A markdown node * @category Builder * @example * ```ts * import { define, codeSnippet } from "@ogs-gmbh/markdown"; * * const markdown = define( * codeSnippet("path/to/code-snippet.ts", { language: "ts" }) * ); * * console.assert( * markdown.toString() * ); * ``` * * @see https://vitepress.dev/guide/markdown#import-code-snippets * @since 1.0.0 * @author Simon Kovtyk */ declare function codeSnippet(path: string, options?: Options): Node; export type { Options as CodeSnippetOptions }; export { codeSnippet }; //# sourceMappingURL=code-snippet.d.ts.map