vitepress-jsdoc
Version:
A bridge between Vitepress and JSDoc-style commented codebases for hassle-free documentation.
52 lines • 2.03 kB
TypeScript
import { type Parser, type DirectoryFile, type ParseReturn, type ParserConfig } from '../interfaces.js';
/**
* The JsDocParser class provides functionality to parse files
* and generate markdown content based on JSDoc comments.
*
* @implements {Parser}
*/
export declare class JsDocParser implements Parser {
/**
* Parses the provided file and returns the generated markdown content.
*
* @param {DirectoryFile} file - The file to be parsed.
* @param {ParserConfig} config - The configuration for parsing.
* @returns {Promise<ParseReturn | undefined>} - The parsed content or undefined.
*/
parse(file: DirectoryFile, config: ParserConfig): Promise<ParseReturn | undefined>;
/**
* Retrieves the content of the provided file.
*
* @private
* @param {DirectoryFile} file - The file whose content is to be retrieved.
* @returns {Promise<string>} - The content of the file.
*/
private getFileContent;
/**
* Generates markdown content based on JSDoc comments in the provided file.
*
* @private
* @param {DirectoryFile} file - The file to be parsed for JSDoc comments.
* @param {ParserConfig} config - The configuration for parsing.
* @returns {Promise<string>} - The generated markdown content.
*/
private getMarkdownContent;
/**
* Resolves the paths to handlebars partials and helpers.
*
* @private
* @param {ParserConfig} config - The configuration containing paths.
* @returns {Object} - An object containing paths to partials and helpers.
*/
private getHandlebarsPaths;
/**
* Computes the paths for the provided file based on the configuration.
*
* @private
* @param {DirectoryFile} file - The file for which paths are to be computed.
* @param {ParserConfig} config - The configuration for path computation.
* @returns {Object} - An object containing the computed paths.
*/
private getPaths;
}
//# sourceMappingURL=jsdoc.d.ts.map