├── .github └── workflows │ └── build.yml ├── .gitignore ├── LICENSE.md ├── README.md ├── example ├── README.md ├── example.ts └── generate-ts-docs.ts ├── package.json ├── scripts ├── generate-ts-docs.ts └── print-example-function-data.ts ├── src ├── create-categories.ts ├── index.ts ├── parse-exported-functions-async.ts ├── render-categories-to-markdown-toc.ts ├── render-category-to-markdown.ts ├── render-function-data-to-markdown.ts ├── render-functions-data-to-markdown-toc.ts ├── types.ts └── utilities │ ├── create-title.ts │ ├── generate-type-declaration-source-files.ts │ ├── parse-type-declaration-source-files.ts │ └── utilities │ ├── serialize-function-declaration-node.ts │ ├── serialize-variable-statement-node.ts │ └── utilities │ ├── normalize-return-type-string.ts │ ├── normalize-type-string.ts │ ├── operations │ ├── find-first-child-node-of-kind.ts │ ├── get-sibling-node.ts │ ├── is-kind.ts │ └── operation.ts │ ├── parse-js-doc.ts │ ├── serialize-parameters-syntax-list-node.ts │ ├── serialize-type-node.ts │ ├── serialize-type-parameters-syntax-list-node.ts │ └── traverse-node.ts ├── test ├── fixtures │ ├── 1-function-declaration │ │ ├── code.ts │ │ ├── functions-data.json │ │ └── markdown.md │ ├── 10-optional-parameters │ │ ├── code.ts │ │ ├── functions-data.json │ │ └── markdown.md │ ├── 11-rest-parameters │ │ ├── code.ts │ │ ├── functions-data.json │ │ └── markdown.md │ ├── 12-type-parameters │ │ ├── code.ts │ │ ├── functions-data.json │ │ └── markdown.md │ ├── 13-variable-statement-function-expression │ │ ├── code.ts │ │ ├── functions-data.json │ │ └── markdown.md │ ├── 14-variable-statement-string-literal │ │ ├── code.ts │ │ ├── functions-data.json │ │ └── markdown.md │ ├── 2-function-description │ │ ├── code.ts │ │ ├── functions-data.json │ │ └── markdown.md │ ├── 3-param-tag │ │ ├── code.ts │ │ ├── functions-data.json │ │ └── markdown.md │ ├── 4-return-tag │ │ ├── code.ts │ │ ├── functions-data.json │ │ └── markdown.md │ ├── 5-category-tag │ │ ├── code.ts │ │ ├── functions-data.json │ │ └── markdown.md │ ├── 6-multiple-functions │ │ ├── code.ts │ │ ├── functions-data.json │ │ └── markdown.md │ ├── 7-weight-tag │ │ ├── code.ts │ │ ├── functions-data.json │ │ └── markdown.md │ ├── 8-ignore-tag │ │ ├── code.ts │ │ ├── functions-data.json │ │ └── markdown.md │ └── 9-object-parameter-type │ │ ├── code.ts │ │ ├── functions-data.json │ │ └── markdown.md ├── parse-exported-functions-async.ts └── render-function-data-to-markdown.ts └── tsconfig.json /.github/workflows/build.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/.github/workflows/build.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | lib/ 3 | node_modules/ 4 | *.log 5 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/LICENSE.md -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/README.md -------------------------------------------------------------------------------- /example/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/example/README.md -------------------------------------------------------------------------------- /example/example.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/example/example.ts -------------------------------------------------------------------------------- /example/generate-ts-docs.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/example/generate-ts-docs.ts -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/package.json -------------------------------------------------------------------------------- /scripts/generate-ts-docs.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/scripts/generate-ts-docs.ts -------------------------------------------------------------------------------- /scripts/print-example-function-data.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/scripts/print-example-function-data.ts -------------------------------------------------------------------------------- /src/create-categories.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/src/create-categories.ts -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/src/index.ts -------------------------------------------------------------------------------- /src/parse-exported-functions-async.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/src/parse-exported-functions-async.ts -------------------------------------------------------------------------------- /src/render-categories-to-markdown-toc.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/src/render-categories-to-markdown-toc.ts -------------------------------------------------------------------------------- /src/render-category-to-markdown.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/src/render-category-to-markdown.ts -------------------------------------------------------------------------------- /src/render-function-data-to-markdown.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/src/render-function-data-to-markdown.ts -------------------------------------------------------------------------------- /src/render-functions-data-to-markdown-toc.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/src/render-functions-data-to-markdown-toc.ts -------------------------------------------------------------------------------- /src/types.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/src/types.ts -------------------------------------------------------------------------------- /src/utilities/create-title.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/src/utilities/create-title.ts -------------------------------------------------------------------------------- /src/utilities/generate-type-declaration-source-files.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/src/utilities/generate-type-declaration-source-files.ts -------------------------------------------------------------------------------- /src/utilities/parse-type-declaration-source-files.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/src/utilities/parse-type-declaration-source-files.ts -------------------------------------------------------------------------------- /src/utilities/utilities/serialize-function-declaration-node.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/src/utilities/utilities/serialize-function-declaration-node.ts -------------------------------------------------------------------------------- /src/utilities/utilities/serialize-variable-statement-node.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/src/utilities/utilities/serialize-variable-statement-node.ts -------------------------------------------------------------------------------- /src/utilities/utilities/utilities/normalize-return-type-string.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/src/utilities/utilities/utilities/normalize-return-type-string.ts -------------------------------------------------------------------------------- /src/utilities/utilities/utilities/normalize-type-string.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/src/utilities/utilities/utilities/normalize-type-string.ts -------------------------------------------------------------------------------- /src/utilities/utilities/utilities/operations/find-first-child-node-of-kind.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/src/utilities/utilities/utilities/operations/find-first-child-node-of-kind.ts -------------------------------------------------------------------------------- /src/utilities/utilities/utilities/operations/get-sibling-node.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/src/utilities/utilities/utilities/operations/get-sibling-node.ts -------------------------------------------------------------------------------- /src/utilities/utilities/utilities/operations/is-kind.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/src/utilities/utilities/utilities/operations/is-kind.ts -------------------------------------------------------------------------------- /src/utilities/utilities/utilities/operations/operation.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/src/utilities/utilities/utilities/operations/operation.ts -------------------------------------------------------------------------------- /src/utilities/utilities/utilities/parse-js-doc.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/src/utilities/utilities/utilities/parse-js-doc.ts -------------------------------------------------------------------------------- /src/utilities/utilities/utilities/serialize-parameters-syntax-list-node.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/src/utilities/utilities/utilities/serialize-parameters-syntax-list-node.ts -------------------------------------------------------------------------------- /src/utilities/utilities/utilities/serialize-type-node.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/src/utilities/utilities/utilities/serialize-type-node.ts -------------------------------------------------------------------------------- /src/utilities/utilities/utilities/serialize-type-parameters-syntax-list-node.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/src/utilities/utilities/utilities/serialize-type-parameters-syntax-list-node.ts -------------------------------------------------------------------------------- /src/utilities/utilities/utilities/traverse-node.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/src/utilities/utilities/utilities/traverse-node.ts -------------------------------------------------------------------------------- /test/fixtures/1-function-declaration/code.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/test/fixtures/1-function-declaration/code.ts -------------------------------------------------------------------------------- /test/fixtures/1-function-declaration/functions-data.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/test/fixtures/1-function-declaration/functions-data.json -------------------------------------------------------------------------------- /test/fixtures/1-function-declaration/markdown.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/test/fixtures/1-function-declaration/markdown.md -------------------------------------------------------------------------------- /test/fixtures/10-optional-parameters/code.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/test/fixtures/10-optional-parameters/code.ts -------------------------------------------------------------------------------- /test/fixtures/10-optional-parameters/functions-data.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/test/fixtures/10-optional-parameters/functions-data.json -------------------------------------------------------------------------------- /test/fixtures/10-optional-parameters/markdown.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/test/fixtures/10-optional-parameters/markdown.md -------------------------------------------------------------------------------- /test/fixtures/11-rest-parameters/code.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/test/fixtures/11-rest-parameters/code.ts -------------------------------------------------------------------------------- /test/fixtures/11-rest-parameters/functions-data.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/test/fixtures/11-rest-parameters/functions-data.json -------------------------------------------------------------------------------- /test/fixtures/11-rest-parameters/markdown.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/test/fixtures/11-rest-parameters/markdown.md -------------------------------------------------------------------------------- /test/fixtures/12-type-parameters/code.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/test/fixtures/12-type-parameters/code.ts -------------------------------------------------------------------------------- /test/fixtures/12-type-parameters/functions-data.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/test/fixtures/12-type-parameters/functions-data.json -------------------------------------------------------------------------------- /test/fixtures/12-type-parameters/markdown.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/test/fixtures/12-type-parameters/markdown.md -------------------------------------------------------------------------------- /test/fixtures/13-variable-statement-function-expression/code.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/test/fixtures/13-variable-statement-function-expression/code.ts -------------------------------------------------------------------------------- /test/fixtures/13-variable-statement-function-expression/functions-data.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/test/fixtures/13-variable-statement-function-expression/functions-data.json -------------------------------------------------------------------------------- /test/fixtures/13-variable-statement-function-expression/markdown.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/test/fixtures/13-variable-statement-function-expression/markdown.md -------------------------------------------------------------------------------- /test/fixtures/14-variable-statement-string-literal/code.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * bar 3 | */ 4 | export const foo = 'x' 5 | -------------------------------------------------------------------------------- /test/fixtures/14-variable-statement-string-literal/functions-data.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/test/fixtures/14-variable-statement-string-literal/functions-data.json -------------------------------------------------------------------------------- /test/fixtures/14-variable-statement-string-literal/markdown.md: -------------------------------------------------------------------------------- 1 | # foo 2 | 3 | (`string`) 4 | 5 | bar 6 | -------------------------------------------------------------------------------- /test/fixtures/2-function-description/code.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/test/fixtures/2-function-description/code.ts -------------------------------------------------------------------------------- /test/fixtures/2-function-description/functions-data.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/test/fixtures/2-function-description/functions-data.json -------------------------------------------------------------------------------- /test/fixtures/2-function-description/markdown.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/test/fixtures/2-function-description/markdown.md -------------------------------------------------------------------------------- /test/fixtures/3-param-tag/code.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/test/fixtures/3-param-tag/code.ts -------------------------------------------------------------------------------- /test/fixtures/3-param-tag/functions-data.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/test/fixtures/3-param-tag/functions-data.json -------------------------------------------------------------------------------- /test/fixtures/3-param-tag/markdown.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/test/fixtures/3-param-tag/markdown.md -------------------------------------------------------------------------------- /test/fixtures/4-return-tag/code.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/test/fixtures/4-return-tag/code.ts -------------------------------------------------------------------------------- /test/fixtures/4-return-tag/functions-data.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/test/fixtures/4-return-tag/functions-data.json -------------------------------------------------------------------------------- /test/fixtures/4-return-tag/markdown.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/test/fixtures/4-return-tag/markdown.md -------------------------------------------------------------------------------- /test/fixtures/5-category-tag/code.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/test/fixtures/5-category-tag/code.ts -------------------------------------------------------------------------------- /test/fixtures/5-category-tag/functions-data.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/test/fixtures/5-category-tag/functions-data.json -------------------------------------------------------------------------------- /test/fixtures/5-category-tag/markdown.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/test/fixtures/5-category-tag/markdown.md -------------------------------------------------------------------------------- /test/fixtures/6-multiple-functions/code.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/test/fixtures/6-multiple-functions/code.ts -------------------------------------------------------------------------------- /test/fixtures/6-multiple-functions/functions-data.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/test/fixtures/6-multiple-functions/functions-data.json -------------------------------------------------------------------------------- /test/fixtures/6-multiple-functions/markdown.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/test/fixtures/6-multiple-functions/markdown.md -------------------------------------------------------------------------------- /test/fixtures/7-weight-tag/code.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/test/fixtures/7-weight-tag/code.ts -------------------------------------------------------------------------------- /test/fixtures/7-weight-tag/functions-data.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/test/fixtures/7-weight-tag/functions-data.json -------------------------------------------------------------------------------- /test/fixtures/7-weight-tag/markdown.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/test/fixtures/7-weight-tag/markdown.md -------------------------------------------------------------------------------- /test/fixtures/8-ignore-tag/code.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/test/fixtures/8-ignore-tag/code.ts -------------------------------------------------------------------------------- /test/fixtures/8-ignore-tag/functions-data.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/test/fixtures/8-ignore-tag/functions-data.json -------------------------------------------------------------------------------- /test/fixtures/8-ignore-tag/markdown.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/test/fixtures/8-ignore-tag/markdown.md -------------------------------------------------------------------------------- /test/fixtures/9-object-parameter-type/code.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/test/fixtures/9-object-parameter-type/code.ts -------------------------------------------------------------------------------- /test/fixtures/9-object-parameter-type/functions-data.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/test/fixtures/9-object-parameter-type/functions-data.json -------------------------------------------------------------------------------- /test/fixtures/9-object-parameter-type/markdown.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/test/fixtures/9-object-parameter-type/markdown.md -------------------------------------------------------------------------------- /test/parse-exported-functions-async.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/test/parse-exported-functions-async.ts -------------------------------------------------------------------------------- /test/render-function-data-to-markdown.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/test/render-function-data-to-markdown.ts -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuanqing/generate-ts-docs/HEAD/tsconfig.json --------------------------------------------------------------------------------