Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

tsdoc2md

yiidot27MIT0.0.20TypeScript support: included

convert typescript comments to markdown file

tsdoc, markdown

readme

tsdoc2md

convert typescript comments to markdown file.

Comments converting of Class, Property, Constructor and Method is implemented. More will come up soon.

Only support annotations @param, @returns, @example.

Please follow typescript doc comment syntax: Doc comment syntax

Demo

tsdoc2md-demo

Install

npm install -g tsdoc2md

Usage

step1

generate config file named 'tsdoc2md.json'

// tsdoc2md.json
{
  "entry": {
    "README": "/lib/index.d.ts"
  },
  "outDir": "/docs/"
}
/**
* 1. key of entry will be name of markdown file.
* 2. entry file should be a declaration file. 
*/

your tsconfig shoud be:

// tsconfig.json
{
  ...
  "declaration": true,
  "declarationMap": true,
  "outDir": "lib"
  ...
}

step2

execute command

# use in terminal
tsdoc2md