---
lang: en
title: 'API docs: tsdocs'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
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/strongloop/loopback-next) monorepo managed by [lerna](https://github.com/lerna/lerna)<!-- -->.

It's built on top of [MicroSoft AP 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

|  Function | Description |
|  --- | --- |
|  [fixConstructorName(name)](./tsdocs.fixconstructorname.md) |  |
|  [getPackages(rootDir)](./tsdocs.getpackages.md) | Get lerna packages and sorted them by location |
|  [getPackagesWithTsDocs(rootDir)](./tsdocs.getpackageswithtsdocs.md) | Get an array of lerna-managed TypeScript packages to generate tsdocs |
|  [getUnscopedPackageName(name)](./tsdocs.getunscopedpackagename.md) | Get un-scoped package name |
|  [runExtractorForMonorepo(options)](./tsdocs.runextractorformonorepo.md) | Run api-extractor for a lerna-managed monrepo |
|  [runExtractorForPackage(pkgDir, options)](./tsdocs.runextractorforpackage.md) |  |
|  [shouldGenerateTsDocs(pkg)](./tsdocs.shouldgeneratetsdocs.md) | Check if a package should be processed for tsdocs |
|  [updateApiDocs(options)](./tsdocs.updateapidocs.md) | Update markdown files generated by api-documenter to prepend Jekyll metadata and generate <code>apidocs/index.md</code>. |

## Interfaces

|  Interface | Description |
|  --- | --- |
|  [ApiDocsOptions](./tsdocs.apidocsoptions.md) | Options for api docs |
|  [ExtractorOptions](./tsdocs.extractoroptions.md) | Options to run api-extractor against the lerna repo |
|  [LernaPackage](./tsdocs.lernapackage.md) | TypeScript definition for {@<!-- -->link https://github.com/lerna/lerna/blob/master/core/package/index.js \| Lerna Package) |

## Variables

|  Variable | Description |
|  --- | --- |
|  [DEFAULT\_APIDOCS\_EXTRACTION\_PATH](./tsdocs.default_apidocs_extraction_path.md) | Default path as the output directory for extracted api reports and models |
|  [DEFAULT\_APIDOCS\_GENERATION\_PATH](./tsdocs.default_apidocs_generation_path.md) | Default path for apidocs to be generated for loopback.io site |
|  [typeScriptPath](./tsdocs.typescriptpath.md) | Export the TypeScript path from <code>@loopback/build</code> |


