---
lang: en
title: 'API docs: tsdocs'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/tsdocs
permalink: /doc/en/lb4/apidocs.tsdocs.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/tsdocs](./tsdocs.md)

## tsdocs package

The `@loopback/tsdocs` package is an internal module to generate [tsdoc](https://github.com/Microsoft/tsdoc) based API docs for `@loopback/*` packages within [loopback-next](https://github.com/loopbackio/loopback-next) monorepo managed by [Lerna](https://github.com/lerna/lerna)<!-- -->.

## Remarks

It's built on top of [Microsoft API Extractor](https://api-extractor.com)<!-- -->:

- [api-extractor](https://github.com/Microsoft/web-build-tools/tree/master/apps/api-extractor) - [api-documenter](https://github.com/Microsoft/web-build-tools/tree/master/apps/api-documenter)

## Functions

<table><thead><tr><th>

Function


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

[getPackages(rootDir)](./tsdocs.getpackages.md)


</td><td>

Get workspace packages and sorted them by location


</td></tr>
<tr><td>

[getPackagesWithTsDocs(rootDir)](./tsdocs.getpackageswithtsdocs.md)


</td><td>

Get an array of lerna-managed TypeScript packages to generate tsdocs


</td></tr>
<tr><td>

[getUnscopedPackageName(name)](./tsdocs.getunscopedpackagename.md)


</td><td>

Get un-scoped package name


</td></tr>
<tr><td>

[runExtractorForMonorepo(options)](./tsdocs.runextractorformonorepo.md)


</td><td>

Run api-extractor for a lerna-managed monrepo


</td></tr>
<tr><td>

[runExtractorForPackage(pkgDir, options)](./tsdocs.runextractorforpackage.md)


</td><td>


</td></tr>
<tr><td>

[shouldGenerateTsDocs(pkg)](./tsdocs.shouldgeneratetsdocs.md)


</td><td>

Check if a package should be processed for tsdocs


</td></tr>
<tr><td>

[updateApiDocs(options)](./tsdocs.updateapidocs.md)


</td><td>

Update markdown files generated by api-documenter to prepend Jekyll metadata and generate `apidocs/index.md`<!-- -->.


</td></tr>
</tbody></table>

## Interfaces

<table><thead><tr><th>

Interface


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

[ApiDocsOptions](./tsdocs.apidocsoptions.md)


</td><td>

Options for api docs


</td></tr>
<tr><td>

[ExtractorOptions](./tsdocs.extractoroptions.md)


</td><td>

Options to run api-extractor against the lerna repo


</td></tr>
<tr><td>

[LernaPackage](./tsdocs.lernapackage.md)


</td><td>

Typescript definition for [Lerna Package](https://github.com/lerna/lerna/blob/master/core/package/index.js)


</td></tr>
</tbody></table>

## Variables

<table><thead><tr><th>

Variable


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

[DEFAULT\_APIDOCS\_EXTRACTION\_PATH](./tsdocs.default_apidocs_extraction_path.md)


</td><td>

Default path as the output directory for extracted api reports and models


</td></tr>
<tr><td>

[DEFAULT\_APIDOCS\_GENERATION\_PATH](./tsdocs.default_apidocs_generation_path.md)


</td><td>

Default path for apidocs to be generated for loopback.io site


</td></tr>
<tr><td>

[typeScriptPath](./tsdocs.typescriptpath.md)


</td><td>

Export the TypeScript path from `@loopback/build`


</td></tr>
</tbody></table>


