@eagleoutice/flowr
Version:
Static Dataflow Analyzer and Program Slicer for the R Programming Language
28 lines (27 loc) • 781 B
TypeScript
/**
* Produces a code block in markdown format.
* @example
* ```typescript
* codeBlock('ts', 'const x = 42;');
* // Produces:
* //
* // ```ts
* // const x = 42;
* // ```
* ```
*/
export declare function codeBlock(language: string, code: string): string;
/**
* Produces an inline code span in markdown format.
* @example
* ```typescript
* codeInline('const x = 42;');
* // Produces: `<code>const x = 42;</code>`
* ```
*/
export declare function codeInline(code: string): string;
/**
* Produces a JSON code block in markdown format, with optional length limit.
* If the pretty-printed JSON exceeds the limit, a message is shown instead of the full JSON.
*/
export declare function jsonWithLimit(object: object, maxLength?: number, tooLongText?: string): string;