UNPKG

@alauda/doom

Version:

Doctor Doom making docs.

36 lines (35 loc) 1.75 kB
import type { Code, Root, RootContent } from 'mdast'; export declare const parseBoolean: (value?: string) => boolean; export declare const parseBooleanOrString: (value?: string) => string | boolean; export declare const isDoc: (filename: string) => boolean; export declare const getMatchedDocFilePaths: (matched: string[]) => Promise<(string | string[])[]>; export declare const stringifyMatter: (frontmatter: object, content: string) => string; /** * Support custom id like `#hello world {#custom-id}` * Avoid https://mdxjs.com/docs/troubleshooting-mdx/#could-not-parse-expression-with-acorn-error * {@link https://github.com/web-infra-dev/rspress/blob/f3e6544780a371d7c629d8784f31dbcf28fb2b07/packages/core/src/node/utils/escapeHeadingIds.ts} */ export declare function escapeMarkdownHeadingIds(content: string): string; export declare const defaultGitHubUrl: (url: string) => string; export declare const parseTerms: () => Promise<{ en: string; zh?: string | undefined; ru?: string | undefined; description?: string | undefined; badCases?: { en?: string[]; zh?: string[]; ru?: string[]; } | undefined; name?: "company" | "product" | "productShort" | "alaudaCloudLink" | undefined; }[]>; export declare const translateCodeFile: (content: RootContent, { sourceBase, targetBase }: { sourceBase: string; targetBase: string; }) => RootContent; export interface CodeBlockPlaceholder { node: Code; placeholder: string; } export declare const replaceCodeBlocksWithPlaceholders: (content: Root | RootContent) => CodeBlockPlaceholder[]; export declare const restoreCodeBlockPlaceholders: (content: Root | RootContent, placeholders: readonly CodeBlockPlaceholder[]) => RootContent | Root;