UNPKG

remark-source-code

Version:

Import code from local files or remote URLs into your markdown

23 lines (22 loc) 709 B
/** * @typedef {import('mdast').Root} Root * @typedef {import('mdast').Code} Code */ /** * @typedef {Object} RemarkSourceCodeOptions * @property {string} [baseDir] - Base directory for resolving local file paths */ /** * Plugin to import code from local files or remote URLs * @param {RemarkSourceCodeOptions} [options={}] * @returns {(tree: Root) => Promise<void>} */ export function remarkSourceCode(options?: RemarkSourceCodeOptions): (tree: Root) => Promise<void>; export type Root = import("mdast").Root; export type Code = import("mdast").Code; export type RemarkSourceCodeOptions = { /** * - Base directory for resolving local file paths */ baseDir?: string | undefined; };