import type { Node } from "./builder.js"; import { type LineHighlight, type LineNumbers } from "./utils.js"; /** * Configuration options for a code element * @category Builder types * * @since 1.0.0 * @author Simon Kovtyk */ type Options = { /** * File name * * @since 1.0.0 * @author Simon Kovtyk */ fileName?: string; /** * Language of the code * * @since 1.0.0 * @author Simon Kovtyk */ language?: string; /** * Flag to define, whether this is a block code or inline code * * @since 1.0.0 * @author Simon Kovtyk */ isBlock?: boolean; /** * Highlight lines * * @since 1.0.0 * @author Simon Kovtyk */ lineHighlights?: LineHighlight[]; /** * Line numbers * * @since 1.0.0 * @author Simon Kovtyk */ lineNumbers?: LineNumbers; }; /** * Builder-element for code * @param value - The content of this element * @param options - Configuration options for this element * @returns A markdown node * @category Builder * @example * ```ts * import { define, code } from "@ogs-gmbh/markdown"; * * const markdown = define( * code("let a = 5;", { language: "ts" }) * ); * * console.assert( * markdown.toString() * ); * ``` * * @see https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#quoting-code * @since 1.0.0 * @author Simon Kovtyk */ declare function code(value: Node | string, options?: Options): Node; export type { Options as CodeOptions }; export { code }; //# sourceMappingURL=code.d.ts.map