• Version 7.0.3
  • Published
  • 7.96 kB
  • No dependencies
  • MIT license


npm i @types/jsdoc-to-markdown
yarn add @types/jsdoc-to-markdown
pnpm add @types/jsdoc-to-markdown


TypeScript definitions for jsdoc-to-markdown



function clear

clear: () => Promise<void>;
  • By default, the output of each invocation of the main generation methods (render, getTemplateData etc) is stored in the cache (your system's temporary directory). Future jsdoc2md invocations with the same input options and source code will return the output immediately from cache, making the tool much faster/cheaper. If the input options or source code changes, fresh output will be generated. This method clears the cache, which you should never need to do unless the cache is failing for some reason. On Mac OSX, the system tmpdir clears itself every few days meaning your jsdoc2md cache will also be routinely cleared.

function getJsdocData

getJsdocData: (options: JsdocOptions) => Promise<object[]>;
  • Returns raw data direct from the underlying jsdoc3.

function getJsdocDataSync

getJsdocDataSync: (options: JsdocOptions) => object[];
  • Sync version of getJsdocData.

function getNamepaths

getNamepaths: (options: JsdocOptions) => Promise<object>;
  • Returns all jsdoc namepaths found in the supplied source code.

function getTemplateData

getTemplateData: (options: JsdocOptions) => Promise<object[]>;
  • Returns the template data (jsdoc-parse output) which is fed into the output template (dmd).

function getTemplateDataSync

getTemplateDataSync: (options: JsdocOptions) => object[];
  • Sync version of getTemplateData.

function render

render: (options: RenderOptions | JsdocOptions) => Promise<string>;
  • Returns markdown documentation from jsdoc-annotated source code.

function renderSync

renderSync: (options: RenderOptions | JsdocOptions) => string;
  • Sync version of render.


interface JsdocOptions

interface JsdocOptions {}

    property 'no-cache'

    'no-cache'?: boolean | undefined;
    • By default results are cached to speed up repeat invocations. Set to true to disable this.

    property configure

    configure?: string | undefined;
    • The path to the jsdoc configuration file. Default: path/to/jsdoc/conf.json.

    property files

    files: string | string[];
    • One or more filenames to process. Accepts globs (e.g. *.js). Either files, source or data must be supplied.

    property source

    source?: string | undefined;
    • A string containing source code to process. Either files, source or data must be supplied.

    interface RenderOptions

    interface RenderOptions {}

      property 'example-lang'

      'example-lang'?: string | undefined;
      • Specifies the default language used in '@example' blocks (for syntax-highlighting purposes). In gfm mode, each '@example' is wrapped in a fenced-code block. Example usage: --example-lang js. Use the special value none for no specific language. While using this option, you can override the supplied language for any '@example' by specifying the subtag, e.g

        Example 1

        hbs. Specifying

        Example 2

        off will disable code blocks for that example.

      property 'global-index-format'

      'global-index-format'?: StyleListFormat | undefined;

        property 'heading-depth'

        'heading-depth'?: number | undefined;
        • The initial heading depth. For example, with a value of 2 the top-level markdown headings look like "## The heading".

        property 'member-index-format'

        'member-index-format'?: MemberIndexFormat | undefined;

          property 'module-index-format'

          'module-index-format'?: StyleListFormat | undefined;

            property 'name-format'

            'name-format'?: string | undefined;
            • Format identifier names in the code style, (i.e. format using backticks or ).

            property 'no-gfm'

            'no-gfm'?: boolean | undefined;
            • By default, dmd generates github-flavoured markdown. Not all markdown parsers render gfm correctly. If your generated docs look incorrect on sites other than Github (e.g. npmjs.org) try enabling this option to disable Github-specific syntax.

            property 'param-list-format'

            'param-list-format'?: RenderListFormat | undefined;
            • Two options to render parameter lists: 'list' or 'table' (default). Table format works well in most cases but switch to list if things begin to look crowded / squashed.

            property 'property-list-format'

            'property-list-format'?: RenderListFormat | undefined;

              property data

              data?: object[] | undefined;
              • Raw template data to use. Useful when you already have template data, obtained from .getTemplateData. Either files, source or data must be supplied.

              property helper

              helper?: string | string[] | undefined;
              • handlebars helper files to override or extend the default set.

              property partial

              partial?: string | string[] | undefined;
              • handlebars partial files to override or extend the default set.

              property plugin

              plugin?: string | string[] | undefined;
              • Use an installed package containing helper and/or partial overrides.

              property separators

              separators?: boolean | undefined;
              • Put breaks between identifiers. Improves readability on bulky docs.

              property template

              template?: string | undefined;
              • The template the supplied documentation will be rendered into. Use the default or supply your own template for full control over the output.

              Type Aliases

              type MemberIndexFormat

              type MemberIndexFormat = 'grouped' | 'list';

                type RenderListFormat

                type RenderListFormat = 'list' | 'table';

                  type StyleListFormat

                  type StyleListFormat = 'none' | 'grouped' | 'table' | 'dl';

                    Package Files (1)

                    Dependencies (0)

                    No dependencies.

                    Dev Dependencies (0)

                    No dev dependencies.

                    Peer Dependencies (0)

                    No peer dependencies.


                    To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                    You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/jsdoc-to-markdown.

                    • Markdown
                    • HTML
                      <a href="https://www.jsdocs.io/package/@types/jsdoc-to-markdown"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>