UNPKG

1.16 kBTypeScriptView Raw
1/**
2 * Convert an annotated TypeScript source file to MarkDown
3 */
4export declare function typescriptSourceToMarkdown(lines: string[], codeBlockAnnotations: string[]): string[];
5export interface LoadedFile {
6 readonly fullPath: string;
7 readonly lines: string[];
8}
9export type FileLoader = (relativePath: string) => LoadedFile;
10/**
11 * Given MarkDown source, find source files to include and render
12 *
13 * We recognize links on a line by themselves if the link text starts
14 * with the string "example" (case insensitive). For example:
15 *
16 * [example](test/integ.bucket.ts)
17 */
18export declare function includeAndRenderExamples(lines: string[], loader: FileLoader, projectRoot: string): string[];
19/**
20 * Load a file into a string array
21 */
22export declare function loadFromFile(fileName: string): string[];
23/**
24 * Turn file content string into an array of lines ready for processing using the other functions
25 */
26export declare function contentToLines(content: string): string[];
27/**
28 * Return a file system loader given a base directory
29 */
30export declare function fileSystemLoader(directory: string): FileLoader;
31//# sourceMappingURL=literate.d.ts.map
\No newline at end of file